mirror of
https://github.com/konvajs/konva.git
synced 2025-12-20 03:59:52 +08:00
add back ie fix
This commit is contained in:
@@ -5,6 +5,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|||||||
|
|
||||||
## [new version][unreleased]
|
## [new version][unreleased]
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
* Better mouse support on mobile devices (yes, that is possible to connect mouse to mobile)
|
||||||
|
|
||||||
## [2.6.0][2018-12-14]
|
## [2.6.0][2018-12-14]
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|||||||
12
konva.js
12
konva.js
@@ -10933,6 +10933,10 @@
|
|||||||
this._fire(CONTENT_MOUSEOUT, { evt: evt });
|
this._fire(CONTENT_MOUSEOUT, { evt: evt });
|
||||||
},
|
},
|
||||||
_mousemove: function(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);
|
||||||
|
}
|
||||||
this._setPointerPosition(evt);
|
this._setPointerPosition(evt);
|
||||||
var shape;
|
var shape;
|
||||||
|
|
||||||
@@ -10981,6 +10985,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
_mousedown: function(evt) {
|
_mousedown: 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._touchstart(evt);
|
||||||
|
}
|
||||||
this._setPointerPosition(evt);
|
this._setPointerPosition(evt);
|
||||||
var shape = this.getIntersection(this.getPointerPosition());
|
var shape = this.getIntersection(this.getPointerPosition());
|
||||||
|
|
||||||
@@ -11010,6 +11018,10 @@
|
|||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
_mouseup: function(evt) {
|
_mouseup: 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._touchend(evt);
|
||||||
|
}
|
||||||
this._setPointerPosition(evt);
|
this._setPointerPosition(evt);
|
||||||
var shape = this.getIntersection(this.getPointerPosition()),
|
var shape = this.getIntersection(this.getPointerPosition()),
|
||||||
clickStartShape = this.clickStartShape,
|
clickStartShape = this.clickStartShape,
|
||||||
|
|||||||
2
konva.min.js
vendored
2
konva.min.js
vendored
File diff suppressed because one or more lines are too long
12
src/Stage.js
12
src/Stage.js
@@ -413,6 +413,10 @@
|
|||||||
this._fire(CONTENT_MOUSEOUT, { evt: evt });
|
this._fire(CONTENT_MOUSEOUT, { evt: evt });
|
||||||
},
|
},
|
||||||
_mousemove: function(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);
|
||||||
|
}
|
||||||
this._setPointerPosition(evt);
|
this._setPointerPosition(evt);
|
||||||
var shape;
|
var shape;
|
||||||
|
|
||||||
@@ -461,6 +465,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
_mousedown: function(evt) {
|
_mousedown: 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._touchstart(evt);
|
||||||
|
}
|
||||||
this._setPointerPosition(evt);
|
this._setPointerPosition(evt);
|
||||||
var shape = this.getIntersection(this.getPointerPosition());
|
var shape = this.getIntersection(this.getPointerPosition());
|
||||||
|
|
||||||
@@ -490,6 +498,10 @@
|
|||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
_mouseup: function(evt) {
|
_mouseup: 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._touchend(evt);
|
||||||
|
}
|
||||||
this._setPointerPosition(evt);
|
this._setPointerPosition(evt);
|
||||||
var shape = this.getIntersection(this.getPointerPosition()),
|
var shape = this.getIntersection(this.getPointerPosition()),
|
||||||
clickStartShape = this.clickStartShape,
|
clickStartShape = this.clickStartShape,
|
||||||
|
|||||||
Reference in New Issue
Block a user