Skip to content

Commit 38ebf09

Browse files
committed
better name
1 parent 927ff15 commit 38ebf09

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

source/js/jquery-sortable.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,6 @@
219219
ContainerGroup.prototype = {
220220
dragInit: function (e, itemContainer) {
221221
this.$document = $(itemContainer.el[0].ownerDocument)
222-
this.isHandled = true
223222

224223
if(itemContainer.enabled()){
225224
this.toggleListeners('on')
@@ -229,11 +228,13 @@
229228
this.itemContainer = itemContainer
230229

231230
this.setPointer(e)
232-
231+
233232
this.options.onMousedown(this.item, e, groupDefaults.onMousedown)
234233
} else {
235234
this.toggleListeners('on', ['drop'])
236235
}
236+
237+
this.dragInitDone = true
237238
},
238239
drag: function (e) {
239240
if(!this.dragging){
@@ -263,7 +264,7 @@
263264
drop: function (e) {
264265
this.toggleListeners('off')
265266

266-
this.isHandled = false
267+
this.dragInitDone = false
267268

268269
if(this.dragging){
269270
// processing Drop, check if placeholder is detached
@@ -352,9 +353,6 @@
352353
}
353354
return this.offsetParent
354355
},
355-
clearOffsetParent: function () {
356-
this.offsetParent = undefined
357-
},
358356
setPointer: function (e) {
359357
var pointer = {
360358
left: e.pageX,
@@ -388,6 +386,9 @@
388386
that.$document[method](eventNames[event], that[event + 'Proxy'])
389387
})
390388
},
389+
clearOffsetParent: function () {
390+
this.offsetParent = undefined
391+
},
391392
// Recursively clear container and item dimensions
392393
clearDimensions: function () {
393394
this.containerDimensions = undefined
@@ -417,7 +418,7 @@
417418
dragInit: function (e) {
418419
var rootGroup = this.rootGroup
419420

420-
if( !rootGroup.isHandled &&
421+
if( !rootGroup.dragInitDone &&
421422
e.which === 1 &&
422423
this.options.drag &&
423424
!$(e.target).is(this.options.exclude))
@@ -526,7 +527,7 @@
526527
return !this.disabled && (!this.parentContainer || this.parentContainer.enabled())
527528
},
528529
$getChildren: function (parent, type) {
529-
return $(parent).children(this.rootGroup.options[type + "Selector"])
530+
return $(parent).find(this.rootGroup.options[type + "Selector"])
530531
},
531532
_serialize: function (parent, isContainer) {
532533
var that = this,

0 commit comments

Comments
 (0)