From 35b540543392845e14c1df0e4b8c971f45111e49 Mon Sep 17 00:00:00 2001 From: Alain ANDRE Date: Thu, 30 May 2013 06:06:38 +0300 Subject: [PATCH] Allow refreshing the droppables on start dragging. If refreshDroppables is set to true, when starting the drag, it will refresh the droppables list so it can take the newest DOM objects in consideration. cf. http://jsfiddle.net/wordsbybird/TAVfk/ --- Source/Drag/Drag.Move.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/Drag/Drag.Move.js b/Source/Drag/Drag.Move.js index cad754ea..b0787e88 100644 --- a/Source/Drag/Drag.Move.js +++ b/Source/Drag/Drag.Move.js @@ -37,7 +37,8 @@ Drag.Move = new Class({ container: false, precalculate: false, includeMargins: true, - checkDroppables: true + checkDroppables: true, + refreshDroppables: false }, initialize: function(element, options){ @@ -67,6 +68,8 @@ Drag.Move = new Class({ }, start: function(event){ + if (this.options.refreshDroppables) this.droppables = $$(this.options.droppables); + if (this.container) this.options.limit = this.calculateLimit(); if (this.options.precalculate){