Merge branch 'master' of github.com:konvajs/konva

This commit is contained in:
Anton Lavrenov
2018-12-18 12:20:32 -05:00

View File

@@ -396,13 +396,10 @@
}
},
_mouseover: function(evt) {
if (!Konva.UA.mobile) {
this._setPointerPosition(evt);
this._fire(CONTENT_MOUSEOVER, { evt: evt });
}
},
_mouseout: function(evt) {
if (!Konva.UA.mobile) {
this._setPointerPosition(evt);
var targetShape = this.targetShape;
@@ -414,25 +411,12 @@
this.pointerPos = undefined;
this._fire(CONTENT_MOUSEOUT, { evt: evt });
}
},
_mousemove: function(evt) {
// workaround for mobile IE to force touch event when unhandled pointer event elevates into a mouse event
if (Konva.UA.ieMobile) {
return this._touchmove(evt);
}
// workaround fake mousemove event in chrome browser https://code.google.com/p/chromium/issues/detail?id=161464
if (
(typeof evt.movementX !== 'undefined' ||
typeof evt.movementY !== 'undefined') &&
evt.movementY === 0 &&
evt.movementX === 0
) {
return null;
}
if (Konva.UA.mobile) {
return null;
}
this._setPointerPosition(evt);
var shape;
@@ -485,7 +469,6 @@
if (Konva.UA.ieMobile) {
return this._touchstart(evt);
}
if (!Konva.UA.mobile) {
this._setPointerPosition(evt);
var shape = this.getIntersection(this.getPointerPosition());
@@ -504,7 +487,6 @@
// content event
this._fire(CONTENT_MOUSEDOWN, { evt: evt });
}
// always call preventDefault for desktop events because some browsers
// try to drag and drop the canvas element
@@ -520,7 +502,6 @@
if (Konva.UA.ieMobile) {
return this._touchend(evt);
}
if (!Konva.UA.mobile) {
this._setPointerPosition(evt);
var shape = this.getIntersection(this.getPointerPosition()),
clickStartShape = this.clickStartShape,
@@ -588,7 +569,6 @@
}
Konva.listenClickTap = false;
}
// always call preventDefault for desktop events because some browsers
// try to drag and drop the canvas element