Reputation: 21
Hi I'm trying to drag a line and save the current position of line after dragged, when I use node.getAbsolutePosition() method, I get the relative position from the last position of my line, but I've read the documentary it says node.getAbsolutePosition() return absolute position relative to top-left corner of canvas
<Line
points={[0,0,100,100]}
stroke="blue"
strokeWidth={5}
onDragMove={(e) => {console.log(e.target.getAbsolutePosition())}}
draggable
/>
is there other way to get the absolute position of line?
Upvotes: 0
Views: 58