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:
Eric Rowell
2012-03-30 22:04:51 -07:00
parent 79c778ebff
commit fc743d1442
3 changed files with 7 additions and 21 deletions

View File

@@ -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;