From 141016ce5b5100bed9fe61e695b247b673511b42 Mon Sep 17 00:00:00 2001 From: Hughie Wilmshurst Date: Mon, 8 Jul 2013 10:47:57 +0100 Subject: [PATCH] Sortable - onStart and onEnd events added, passed to draggables Add options for onStart and onEnd events, which are passed to the draggable objects. --- src/dragdrop.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/dragdrop.js b/src/dragdrop.js index 1a3afe0..f8554e1 100644 --- a/src/dragdrop.js +++ b/src/dragdrop.js @@ -647,7 +647,9 @@ var Sortable = { handles: false, onChange: Prototype.emptyFunction, - onUpdate: Prototype.emptyFunction + onUpdate: Prototype.emptyFunction, + onStart: Prototype.emptyFunction, + onEnd: Prototype.emptyFunction }, arguments[1] || { }); // clear any old sortable with same element @@ -663,7 +665,9 @@ var Sortable = { delay: options.delay, ghosting: options.ghosting, constraint: options.constraint, - handle: options.handle }; + handle: options.handle, + onStart: options.onStart, + onEnd: options.onEnd }; if(options.starteffect) options_for_draggable.starteffect = options.starteffect; @@ -969,4 +973,4 @@ Element.findChildren = function(element, only, recursive, tagName) { Element.offsetSize = function (element, type) { return element['offset' + ((type=='vertical' || type=='height') ? 'Height' : 'Width')]; -}; \ No newline at end of file +};