|
|
@ -59,6 +59,11 @@ |
|
|
|
parseInt = win.parseInt, |
|
|
|
parseInt = win.parseInt, |
|
|
|
|
|
|
|
|
|
|
|
supportDraggable = !!('draggable' in document.createElement('div')), |
|
|
|
supportDraggable = !!('draggable' in document.createElement('div')), |
|
|
|
|
|
|
|
supportCssPointerEvents = (function (el) { |
|
|
|
|
|
|
|
el = document.createElement('x'); |
|
|
|
|
|
|
|
el.style.cssText = 'pointer-events:auto'; |
|
|
|
|
|
|
|
return el.style.pointerEvents === 'auto'; |
|
|
|
|
|
|
|
})(), |
|
|
|
|
|
|
|
|
|
|
|
_silent = false, |
|
|
|
_silent = false, |
|
|
|
|
|
|
|
|
|
|
@ -411,7 +416,9 @@ |
|
|
|
this._lastX = touchEvt.clientX; |
|
|
|
this._lastX = touchEvt.clientX; |
|
|
|
this._lastY = touchEvt.clientY; |
|
|
|
this._lastY = touchEvt.clientY; |
|
|
|
|
|
|
|
|
|
|
|
_css(ghostEl, 'display', 'none'); |
|
|
|
if (!supportCssPointerEvents) { |
|
|
|
|
|
|
|
_css(ghostEl, 'display', 'none'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY), |
|
|
|
var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY), |
|
|
|
parent = target, |
|
|
|
parent = target, |
|
|
@ -439,7 +446,9 @@ |
|
|
|
while (parent = parent.parentNode); |
|
|
|
while (parent = parent.parentNode); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
_css(ghostEl, 'display', ''); |
|
|
|
if (!supportCssPointerEvents) { |
|
|
|
|
|
|
|
_css(ghostEl, 'display', ''); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
@ -489,6 +498,7 @@ |
|
|
|
_css(ghostEl, 'opacity', '0.8'); |
|
|
|
_css(ghostEl, 'opacity', '0.8'); |
|
|
|
_css(ghostEl, 'position', 'fixed'); |
|
|
|
_css(ghostEl, 'position', 'fixed'); |
|
|
|
_css(ghostEl, 'zIndex', '100000'); |
|
|
|
_css(ghostEl, 'zIndex', '100000'); |
|
|
|
|
|
|
|
_css(ghostEl, 'pointerEvents', 'none'); |
|
|
|
|
|
|
|
|
|
|
|
this.options.fallbackOnBody && document.body.appendChild(ghostEl) || rootEl.appendChild(ghostEl); |
|
|
|
this.options.fallbackOnBody && document.body.appendChild(ghostEl) || rootEl.appendChild(ghostEl); |
|
|
|
|
|
|
|
|
|
|
|