mirror of
https://github.com/konvajs/konva.git
synced 2026-01-21 18:51:52 +08:00
better support for dragging when mouse out of stage. fix #105.
This commit is contained in:
@@ -6,6 +6,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
### Fixed
|
||||
- correct `Konva.Arrow` drawing. Now it works better.
|
||||
- Better support for dragging when mouse out of stage
|
||||
|
||||
## [0.10.0][2015-10-27]
|
||||
|
||||
|
||||
19
konva.js
19
konva.js
@@ -3,7 +3,7 @@
|
||||
* Konva JavaScript Framework v0.11.0
|
||||
* http://konvajs.github.io/
|
||||
* Licensed under the MIT or GPL Version 2 licenses.
|
||||
* Date: Fri Oct 30 2015
|
||||
* Date: Sat Nov 21 2015
|
||||
*
|
||||
* Original work Copyright (C) 2011 - 2013 by Eric Rowell (KineticJS)
|
||||
* Modified work Copyright (C) 2014 - 2015 by Anton Lavrenov (Konva)
|
||||
@@ -9108,21 +9108,8 @@ var Konva = {};
|
||||
}
|
||||
// mouse events
|
||||
else {
|
||||
if (!contentPosition) {
|
||||
x = evt.offsetX;
|
||||
y = evt.offetY;
|
||||
}
|
||||
// we unfortunately have to use UA detection here because accessing
|
||||
// the layerX or layerY properties in newer versions of Chrome
|
||||
// throws a JS warning. layerX and layerY are required for FF
|
||||
// when the container is transformed via CSS.
|
||||
else if (Konva.UA.browser === 'mozilla') {
|
||||
x = evt.layerX || (evt.clientX - contentPosition.left);
|
||||
y = evt.layerY || (evt.clientY - contentPosition.top);
|
||||
} else {
|
||||
x = evt.clientX - contentPosition.left;
|
||||
y = evt.clientY - contentPosition.top;
|
||||
}
|
||||
x = evt.clientX - contentPosition.left;
|
||||
y = evt.clientY - contentPosition.top;
|
||||
}
|
||||
|
||||
if (x !== null && y !== null) {
|
||||
|
||||
8
konva.min.js
vendored
8
konva.min.js
vendored
File diff suppressed because one or more lines are too long
17
src/Stage.js
17
src/Stage.js
@@ -650,21 +650,8 @@
|
||||
}
|
||||
// mouse events
|
||||
else {
|
||||
if (!contentPosition) {
|
||||
x = evt.offsetX;
|
||||
y = evt.offetY;
|
||||
}
|
||||
// we unfortunately have to use UA detection here because accessing
|
||||
// the layerX or layerY properties in newer versions of Chrome
|
||||
// throws a JS warning. layerX and layerY are required for FF
|
||||
// when the container is transformed via CSS.
|
||||
else if (Konva.UA.browser === 'mozilla') {
|
||||
x = evt.layerX || (evt.clientX - contentPosition.left);
|
||||
y = evt.layerY || (evt.clientY - contentPosition.top);
|
||||
} else {
|
||||
x = evt.clientX - contentPosition.left;
|
||||
y = evt.clientY - contentPosition.top;
|
||||
}
|
||||
x = evt.clientX - contentPosition.left;
|
||||
y = evt.clientY - contentPosition.top;
|
||||
}
|
||||
|
||||
if (x !== null && y !== null) {
|
||||
|
||||
Reference in New Issue
Block a user