Merge cab775d7ac into 49d5cee91e
This commit is contained in:
commit
8b9df3a3c1
|
|
@ -609,12 +609,13 @@ that.grab = function() {
|
||||||
|
|
||||||
if ('ontouchstart' in document.documentElement) {
|
if ('ontouchstart' in document.documentElement) {
|
||||||
Util.addEvent(c, 'touchstart', onMouseDown);
|
Util.addEvent(c, 'touchstart', onMouseDown);
|
||||||
Util.addEvent(c, 'touchend', onMouseUp);
|
Util.addEvent(window, 'touchend', onMouseUp);
|
||||||
Util.addEvent(c, 'touchmove', onMouseMove);
|
Util.addEvent(c, 'touchmove', onMouseMove);
|
||||||
} else {
|
} else {
|
||||||
Util.addEvent(c, 'mousedown', onMouseDown);
|
Util.addEvent(c, 'mousedown', onMouseDown);
|
||||||
Util.addEvent(c, 'mouseup', onMouseUp);
|
Util.addEvent(window, 'mouseup', onMouseUp);
|
||||||
Util.addEvent(c, 'mousemove', onMouseMove);
|
Util.addEvent(c, 'mousemove', onMouseMove);
|
||||||
|
Util.addEvent(c, 'mouseout', onMouseMove);
|
||||||
Util.addEvent(c, (Util.Engine.gecko) ? 'DOMMouseScroll' : 'mousewheel',
|
Util.addEvent(c, (Util.Engine.gecko) ? 'DOMMouseScroll' : 'mousewheel',
|
||||||
onMouseWheel);
|
onMouseWheel);
|
||||||
}
|
}
|
||||||
|
|
@ -632,12 +633,13 @@ that.ungrab = function() {
|
||||||
|
|
||||||
if ('ontouchstart' in document.documentElement) {
|
if ('ontouchstart' in document.documentElement) {
|
||||||
Util.removeEvent(c, 'touchstart', onMouseDown);
|
Util.removeEvent(c, 'touchstart', onMouseDown);
|
||||||
Util.removeEvent(c, 'touchend', onMouseUp);
|
Util.removeEvent(window, 'touchend', onMouseUp);
|
||||||
Util.removeEvent(c, 'touchmove', onMouseMove);
|
Util.removeEvent(c, 'touchmove', onMouseMove);
|
||||||
} else {
|
} else {
|
||||||
Util.removeEvent(c, 'mousedown', onMouseDown);
|
Util.removeEvent(c, 'mousedown', onMouseDown);
|
||||||
Util.removeEvent(c, 'mouseup', onMouseUp);
|
Util.removeEvent(window, 'mouseup', onMouseUp);
|
||||||
Util.removeEvent(c, 'mousemove', onMouseMove);
|
Util.removeEvent(c, 'mousemove', onMouseMove);
|
||||||
|
Util.removeEvent(c, 'mouseout', onMouseUp);
|
||||||
Util.removeEvent(c, (Util.Engine.gecko) ? 'DOMMouseScroll' : 'mousewheel',
|
Util.removeEvent(c, (Util.Engine.gecko) ? 'DOMMouseScroll' : 'mousewheel',
|
||||||
onMouseWheel);
|
onMouseWheel);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue