new setDetectionType() and getDetectionType() methods to enable path and pixel detection swapping

This commit is contained in:
Eric Rowell
2012-04-14 21:46:38 -07:00
parent 860025263b
commit 47b8a8e0d6
5 changed files with 121 additions and 56 deletions

View File

@@ -289,6 +289,19 @@ Kinetic.Node.prototype = {
setY: function(y) {
this.attrs.y = y;
},
/**
* set detection type
* @param {String} type can be "path" or "pixel"
*/
setDetectionType: function(type) {
this.attrs.detectionType = type;
},
/**
* get detection type
*/
getDetectionType: function() {
return this.attrs.detectionType;
},
/**
* get node position relative to container
*/