mirror of
https://github.com/konvajs/konva.git
synced 2025-10-15 12:34:52 +08:00
fixed #363
This commit is contained in:
@@ -43,16 +43,17 @@
|
||||
*/
|
||||
setPoints: function(val) {
|
||||
this.setAttr('points', Kinetic.Type._getPoints(val));
|
||||
},
|
||||
/**
|
||||
* get points array
|
||||
* @name getPoints
|
||||
* @methodOf Kinetic.Line.prototype
|
||||
*/
|
||||
// NOTE: cannot use getter method because we need to return a new
|
||||
// default array literal each time because arrays are modified by reference
|
||||
getPoints: function() {
|
||||
return this.attrs.points || [];
|
||||
}
|
||||
};
|
||||
Kinetic.Global.extend(Kinetic.Line, Kinetic.Shape);
|
||||
|
||||
// add getters setters
|
||||
Kinetic.Node.addGetter(Kinetic.Line, 'points', []);
|
||||
|
||||
/**
|
||||
* get points array
|
||||
* @name getPoints
|
||||
* @methodOf Kinetic.Line.prototype
|
||||
*/
|
||||
})();
|
||||
|
Reference in New Issue
Block a user