ericdrowell / KineticJS

KineticJS is an HTML5 Canvas JavaScript framework that extends the 2d context by enabling canvas interactivity for desktop and mobile applications.
http://www.kineticjs.com
3.98k stars 753 forks source link

Updating Line Points #1038

Closed timgiesenberg closed 9 years ago

timgiesenberg commented 9 years ago

Hi everyone,

i've made a drawing tool using Kineticjs. The user can draw lines and drag them around.

But i need to update the line.points() so the points can be translated by user input afterwards.

I created a jsfiddle with my issue: http://jsfiddle.net/GiesDenBerg/3swpvtr4

The circles get the right position of the line, but the line seems to be rendered with an offset. You can see this when dragend is fired. The two circles are perfectly rendered where the line should be, but the line is not.

Thanks in advance for any kind of help :)

timgiesenberg commented 9 years ago

Okay, the issue was never a real issue. It was a misunderstanding of how stuff works. The jsfiddle shows a correct solution of the original problem.

Marked as closed