Changeset 1525
- Timestamp:
- 04/07/08 22:14:00 (1 month ago)
- Files:
-
- 1 modified
-
trunk/Source/Plugins/Drag.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/Plugins/Drag.js
r1485 r1525 24 24 handle: false, 25 25 invert: false, 26 preventDefault: false, 26 27 modifiers: {x: 'left', y: 'top'} 27 28 }, … … 61 62 62 63 start: function(event){ 64 if (this.options.preventDefault) event.preventDefault(); 63 65 this.fireEvent('onBeforeStart', this.element); 64 66 this.mouse.start = event.page; … … 83 85 84 86 check: function(event){ 87 if (this.options.preventDefault) event.preventDefault(); 85 88 var distance = Math.round(Math.sqrt(Math.pow(event.page.x - this.mouse.start.x, 2) + Math.pow(event.page.y - this.mouse.start.y, 2))); 86 89 if (distance > this.options.snap){ … … 95 98 96 99 drag: function(event){ 100 if (this.options.preventDefault) event.preventDefault(); 97 101 this.mouse.now = event.page; 98 102 for (var z in this.options.modifiers){