If I create a line…
var line = new Kinetic.Line({
points: [0 , 5, 0, 100],
stroke: 'black',
strokeWidth: 2,
draggable: true
});
And I attach a event…
line.on("mouseup", function () {
updateLineInput( this.attrs.points );
});
How could I get the points back out? this.attrs.points does not work…
You can get the points with
line.getPoints()but they usually don’t change after dragging and dropping, the X, Y coordinates change which the relative points are drawn from. You can get those withline.getX()andline.getY()