|
|
@ -241,7 +241,7 @@ |
|
|
|
_on(document, 'touchmove', this._onTouchMove); |
|
|
|
_on(document, 'touchmove', this._onTouchMove); |
|
|
|
_on(document, 'touchend', this._onDrop); |
|
|
|
_on(document, 'touchend', this._onDrop); |
|
|
|
|
|
|
|
|
|
|
|
this._loopId = setInterval(this._emulateDragOver, 100); |
|
|
|
this._loopId = setInterval(this._emulateDragOver, 200); |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
else { |
|
|
|
dataTransfer.effectAllowed = 'move'; |
|
|
|
dataTransfer.effectAllowed = 'move'; |
|
|
@ -277,19 +277,22 @@ |
|
|
|
, width = rect.right - rect.left |
|
|
|
, width = rect.right - rect.left |
|
|
|
, height = rect.bottom - rect.top |
|
|
|
, height = rect.bottom - rect.top |
|
|
|
, floating = /left|right|inline/.test(lastCSS.cssFloat + lastCSS.display) |
|
|
|
, floating = /left|right|inline/.test(lastCSS.cssFloat + lastCSS.display) |
|
|
|
, after = ( |
|
|
|
, skew = (floating ? (evt.clientX - rect.left)/width : (evt.clientY - rect.top)/height) > .5 |
|
|
|
(!floating && (evt.clientY - rect.top)/height > .5) |
|
|
|
, isLong = (target.offsetHeight > dragEl.offsetHeight) |
|
|
|
|| (floating && |
|
|
|
, isWide = (target.offsetWidth > dragEl.offsetWidth) |
|
|
|
(target.nextElementSibling !== dragEl) |
|
|
|
|
|
|
|
|| (target.previousElementSibling === dragEl) |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
, nextSibling = target.nextSibling |
|
|
|
, nextSibling = target.nextSibling |
|
|
|
|
|
|
|
, after |
|
|
|
; |
|
|
|
; |
|
|
|
|
|
|
|
|
|
|
|
_silent = true; |
|
|
|
_silent = true; |
|
|
|
setTimeout(_unsilent, 30); |
|
|
|
setTimeout(_unsilent, 30); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if( floating ){ |
|
|
|
|
|
|
|
after = (target.previousElementSibling === dragEl) && !isWide || (skew > .5) && isWide |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
after = (target.nextElementSibling !== dragEl) && !isLong || (skew > .5) && isLong; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if( after && !nextSibling ){ |
|
|
|
if( after && !nextSibling ){ |
|
|
|
el.appendChild(dragEl); |
|
|
|
el.appendChild(dragEl); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|