mirror of
https://github.com/konvajs/konva.git
synced 2025-06-28 06:07:13 +08:00
fixed bug with mouseout / mouseover events with nodes on the edge of the stage
This commit is contained in:
parent
21981e94eb
commit
0ac84408e9
7
dist/kinetic-core.js
vendored
7
dist/kinetic-core.js
vendored
@ -1285,7 +1285,6 @@ Kinetic.Stage.prototype = {
|
||||
else if(!isDragging && this.targetShape && this.targetShape.id === shape.id) {
|
||||
this._setTarget(undefined);
|
||||
this.mouseoutShape = shape;
|
||||
//shape._handleEvents('onmouseout', evt);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1310,7 +1309,6 @@ Kinetic.Stage.prototype = {
|
||||
var oldEl = this.targetShape.eventListeners;
|
||||
if(oldEl) {
|
||||
this.mouseoutShape = this.targetShape;
|
||||
//this.targetShape._handleEvents('onmouseout', evt);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
@ -1384,7 +1382,6 @@ Kinetic.Stage.prototype = {
|
||||
if(!shapeDetected && this.mouseoutShape) {
|
||||
this.mouseoutShape._handleEvents('onmouseout', evt);
|
||||
this.mouseoutShape = undefined;
|
||||
|
||||
}
|
||||
},
|
||||
/**
|
||||
@ -1423,6 +1420,7 @@ Kinetic.Stage.prototype = {
|
||||
var targetShape = that.targetShape;
|
||||
if(targetShape) {
|
||||
targetShape._handleEvents('onmouseout', evt);
|
||||
that.targetShape = undefined;
|
||||
}
|
||||
that.mousePos = undefined;
|
||||
}, false);
|
||||
@ -1435,8 +1433,7 @@ Kinetic.Stage.prototype = {
|
||||
|
||||
this.content.addEventListener('touchmove', function(evt) {
|
||||
evt.preventDefault();
|
||||
that._handleStageEvent(evt);
|
||||
}, false);
|
||||
that._handleStageEvent(evt);}, false);
|
||||
|
||||
this.content.addEventListener('touchend', function(evt) {
|
||||
evt.preventDefault();
|
||||
|
4
dist/kinetic-core.min.js
vendored
4
dist/kinetic-core.min.js
vendored
File diff suppressed because one or more lines are too long
@ -372,7 +372,6 @@ Kinetic.Stage.prototype = {
|
||||
else if(!isDragging && this.targetShape && this.targetShape.id === shape.id) {
|
||||
this._setTarget(undefined);
|
||||
this.mouseoutShape = shape;
|
||||
//shape._handleEvents('onmouseout', evt);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -397,7 +396,6 @@ Kinetic.Stage.prototype = {
|
||||
var oldEl = this.targetShape.eventListeners;
|
||||
if(oldEl) {
|
||||
this.mouseoutShape = this.targetShape;
|
||||
//this.targetShape._handleEvents('onmouseout', evt);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
@ -471,7 +469,6 @@ Kinetic.Stage.prototype = {
|
||||
if(!shapeDetected && this.mouseoutShape) {
|
||||
this.mouseoutShape._handleEvents('onmouseout', evt);
|
||||
this.mouseoutShape = undefined;
|
||||
|
||||
}
|
||||
},
|
||||
/**
|
||||
@ -510,6 +507,7 @@ Kinetic.Stage.prototype = {
|
||||
var targetShape = that.targetShape;
|
||||
if(targetShape) {
|
||||
targetShape._handleEvents('onmouseout', evt);
|
||||
that.targetShape = undefined;
|
||||
}
|
||||
that.mousePos = undefined;
|
||||
}, false);
|
||||
@ -522,8 +520,7 @@ Kinetic.Stage.prototype = {
|
||||
|
||||
this.content.addEventListener('touchmove', function(evt) {
|
||||
evt.preventDefault();
|
||||
that._handleStageEvent(evt);
|
||||
}, false);
|
||||
that._handleStageEvent(evt);}, false);
|
||||
|
||||
this.content.addEventListener('touchend', function(evt) {
|
||||
evt.preventDefault();
|
||||
|
Loading…
Reference in New Issue
Block a user