Author: nbelaevski
Date: 2007-03-20 14:43:39 -0400 (Tue, 20 Mar 2007)
New Revision: 40
Modified:
trunk/framework/src/main/javascript/dnd/dnd.js
Log:
onupdatedrag(event) callback handling added
Modified: trunk/framework/src/main/javascript/dnd/dnd.js
===================================================================
--- trunk/framework/src/main/javascript/dnd/dnd.js 2007-03-15 20:07:42 UTC (rev 39)
+++ trunk/framework/src/main/javascript/dnd/dnd.js 2007-03-20 18:43:39 UTC (rev 40)
@@ -48,10 +48,13 @@
updateDrag: function(event) {
var drag = window.drag;
- var x = Event.pointerX(event);
- var y = Event.pointerY(event);
- drag.indicator.position(x + 5, y + 14);
- Event.stop(event);
+
+ if (!drag.source.onupdatedrag || (drag.source.onupdatedrag(event) != false)) {
+ var x = Event.pointerX(event);
+ var y = Event.pointerY(event);
+ drag.indicator.position(x + 5, y + 14);
+ Event.stop(event);
+ }
},
initialized : false,
Show replies by date