react-rnd icon indicating copy to clipboard operation
react-rnd copied to clipboard

How to get current position and size?

Open HeWei-imagineer opened this issue 2 years ago • 1 comments

Is there a API can get the rnd's current size and position. I just find originalPosition, resizingPosition, getDraggablePosition, but I want the position offset relative to parent component when resizing or drag end.

HeWei-imagineer avatar Apr 19 '22 07:04 HeWei-imagineer

    let el = (this.rnd.getParent() as HTMLElement).parentElement;
    let p = this.rnd.getDraggablePosition();
    let size = this.rnd.resizable.size;

FishOrBear avatar Apr 22 '22 08:04 FishOrBear