mirror of
https://github.com/konvajs/konva.git
synced 2025-10-15 12:34:52 +08:00
added setX and setY methods for convenience
This commit is contained in:
14
src/Node.js
14
src/Node.js
@@ -250,6 +250,20 @@ Kinetic.Node.prototype = {
|
||||
this.attrs.x = x;
|
||||
this.attrs.y = y;
|
||||
},
|
||||
/**
|
||||
* set node x position
|
||||
* @param {Number} x
|
||||
*/
|
||||
setX: function(x) {
|
||||
this.attrs.x = x;
|
||||
},
|
||||
/**
|
||||
* set node y position
|
||||
* @param {Number} y
|
||||
*/
|
||||
setY: function(y) {
|
||||
this.attrs.y = y;
|
||||
},
|
||||
/**
|
||||
* get node position relative to container
|
||||
*/
|
||||
|
Reference in New Issue
Block a user