|
219 | 219 | ContainerGroup.prototype = { |
220 | 220 | dragInit: function (e, itemContainer) { |
221 | 221 | this.$document = $(itemContainer.el[0].ownerDocument) |
222 | | - this.isHandled = true |
223 | 222 |
|
224 | 223 | if(itemContainer.enabled()){ |
225 | 224 | this.toggleListeners('on') |
|
229 | 228 | this.itemContainer = itemContainer |
230 | 229 |
|
231 | 230 | this.setPointer(e) |
232 | | - |
| 231 | + |
233 | 232 | this.options.onMousedown(this.item, e, groupDefaults.onMousedown) |
234 | 233 | } else { |
235 | 234 | this.toggleListeners('on', ['drop']) |
236 | 235 | } |
| 236 | + |
| 237 | + this.dragInitDone = true |
237 | 238 | }, |
238 | 239 | drag: function (e) { |
239 | 240 | if(!this.dragging){ |
|
263 | 264 | drop: function (e) { |
264 | 265 | this.toggleListeners('off') |
265 | 266 |
|
266 | | - this.isHandled = false |
| 267 | + this.dragInitDone = false |
267 | 268 |
|
268 | 269 | if(this.dragging){ |
269 | 270 | // processing Drop, check if placeholder is detached |
|
352 | 353 | } |
353 | 354 | return this.offsetParent |
354 | 355 | }, |
355 | | - clearOffsetParent: function () { |
356 | | - this.offsetParent = undefined |
357 | | - }, |
358 | 356 | setPointer: function (e) { |
359 | 357 | var pointer = { |
360 | 358 | left: e.pageX, |
|
388 | 386 | that.$document[method](eventNames[event], that[event + 'Proxy']) |
389 | 387 | }) |
390 | 388 | }, |
| 389 | + clearOffsetParent: function () { |
| 390 | + this.offsetParent = undefined |
| 391 | + }, |
391 | 392 | // Recursively clear container and item dimensions |
392 | 393 | clearDimensions: function () { |
393 | 394 | this.containerDimensions = undefined |
|
417 | 418 | dragInit: function (e) { |
418 | 419 | var rootGroup = this.rootGroup |
419 | 420 |
|
420 | | - if( !rootGroup.isHandled && |
| 421 | + if( !rootGroup.dragInitDone && |
421 | 422 | e.which === 1 && |
422 | 423 | this.options.drag && |
423 | 424 | !$(e.target).is(this.options.exclude)) |
|
526 | 527 | return !this.disabled && (!this.parentContainer || this.parentContainer.enabled()) |
527 | 528 | }, |
528 | 529 | $getChildren: function (parent, type) { |
529 | | - return $(parent).children(this.rootGroup.options[type + "Selector"]) |
| 530 | + return $(parent).find(this.rootGroup.options[type + "Selector"]) |
530 | 531 | }, |
531 | 532 | _serialize: function (parent, isContainer) { |
532 | 533 | var that = this, |
|
0 commit comments