mirror of
https://github.com/konvajs/konva.git
synced 2025-10-15 12:34:52 +08:00
new setDetectionType() and getDetectionType() methods to enable path and pixel detection swapping
This commit is contained in:
13
src/Node.js
13
src/Node.js
@@ -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
|
||||
*/
|
||||
|
Reference in New Issue
Block a user