mirror of
https://github.com/konvajs/konva.git
synced 2025-12-04 19:08:24 +08:00
added extensible isPointInPath
This commit is contained in:
committed by
Eric Rowell
parent
540670ba8b
commit
79c778ebff
@@ -238,18 +238,16 @@ 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 && backstageLayerContext.isPointInPath(pos.x, pos.y)) {
|
||||
if(shape.visible && pos !== undefined && shape.isPointInShape(backstageLayer,pos)) {
|
||||
// handle onmousedown
|
||||
if(!isDragging && this.mouseDown) {
|
||||
this.mouseDown = false;
|
||||
|
||||
Reference in New Issue
Block a user