mirror of
https://github.com/konvajs/konva.git
synced 2025-12-05 03:24:23 +08:00
finished pixel detection algo which can be applied to any Shape. This enables a lot of new functionality, such as image pixel detection, shape border detection, and custom shape detection that isn't drawn with a standard path
This commit is contained in:
@@ -254,7 +254,7 @@ Kinetic.Stage.prototype = {
|
||||
this.targetFound = true;
|
||||
}
|
||||
|
||||
if(shape.visible && pos !== undefined && shape._isPointInPath(pos)) {
|
||||
if(shape.visible && pos !== undefined && shape._isPointInShape(pos)) {
|
||||
// handle onmousedown
|
||||
if(!isDragging && this.mouseDown) {
|
||||
this.mouseDown = false;
|
||||
@@ -456,8 +456,8 @@ Kinetic.Stage.prototype = {
|
||||
* clear default layers
|
||||
*/
|
||||
_clearDefaultLayers: function() {
|
||||
var pathLayer = this.pathLayer;
|
||||
pathLayer.clear();
|
||||
this.bufferLayer.clear();
|
||||
this.pathLayer.clear();
|
||||
},
|
||||
/**
|
||||
* begin listening for events by adding event handlers
|
||||
|
||||
Reference in New Issue
Block a user