diff options
author | Tobi Oetiker <tobi@oetiker.ch> | 2007-09-29 16:30:24 +0200 |
---|---|---|
committer | Tobi Oetiker <tobi@oetiker.ch> | 2007-09-29 16:30:24 +0200 |
commit | 8d9ecb5de29a91d0fa71c889516ec557508616fd (patch) | |
tree | a307a5db8fea11e2ddb8780fa0e434765013b36b /htdocs/cropper/cropper.js | |
parent | 2b09417b8ca76689f147f1097806af9820cfc9b8 (diff) | |
download | smokeping-8d9ecb5de29a91d0fa71c889516ec557508616fd.tar.gz smokeping-8d9ecb5de29a91d0fa71c889516ec557508616fd.tar.xz |
disable right click
Diffstat (limited to 'htdocs/cropper/cropper.js')
-rw-r--r-- | htdocs/cropper/cropper.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/htdocs/cropper/cropper.js b/htdocs/cropper/cropper.js index 486a92a..0e4ba7b 100644 --- a/htdocs/cropper/cropper.js +++ b/htdocs/cropper/cropper.js @@ -457,13 +457,15 @@ this.startCoords=this.cloneCoords(this.areaCoords); this.resizing=true; this.resizeHandle=Event.element(e).classNames().toString().replace(/([^N|NE|E|SE|S|SW|W|NW])+/,""); Event.stop(e); -},startDrag:function(e){ +},startDrag:function(e){
+if(Event.isLeftClick(e)){ this.selArea.show(); this.clickCoords=this.getCurPos(e); this.setAreaCoords({x1:this.clickCoords.x,y1:this.clickCoords.y,x2:this.clickCoords.x,y2:this.clickCoords.y},false,false,null); this.dragging=true; this.onDrag(e); -Event.stop(e); +Event.stop(e);
+} },getCurPos:function(e){ var el=this.imgWrap,wrapOffsets=Position.cumulativeOffset(el); while(el.nodeName!="BODY"){ |