mirror of
https://github.com/konvajs/konva.git
synced 2025-12-05 03:24:23 +08:00
undid last commit. I pulled in a commit from another fork which makes the isPointInPath extensible, but then realized that this doesn't really have a usage outside of my current path detection algo because the backstage layer needs to be redrawn each time
This commit is contained in:
@@ -238,16 +238,18 @@ Kinetic.Stage.prototype = {
|
||||
_detectEvent: function(shape, evt) {
|
||||
var isDragging = Kinetic.GlobalObject.drag.moving;
|
||||
var backstageLayer = this.backstageLayer;
|
||||
var backstageLayerContext = backstageLayer.getContext();
|
||||
var go = Kinetic.GlobalObject;
|
||||
var pos = this.getUserPosition();
|
||||
var el = shape.eventListeners;
|
||||
|
||||
shape._draw(backstageLayer);
|
||||
|
||||
if(this.targetShape && shape.id === this.targetShape.id) {
|
||||
this.targetFound = true;
|
||||
}
|
||||
|
||||
if(shape.visible && pos !== undefined && shape.isPointInShape(backstageLayer,pos)) {
|
||||
if(shape.visible && pos !== undefined && backstageLayerContext.isPointInPath(pos.x, pos.y)) {
|
||||
// handle onmousedown
|
||||
if(!isDragging && this.mouseDown) {
|
||||
this.mouseDown = false;
|
||||
|
||||
Reference in New Issue
Block a user