xyflow icon indicating copy to clipboard operation
xyflow copied to clipboard

Resize and Rotate example's select div not positioned correctly

Open hgeldenhuys opened this issue 3 years ago • 3 comments

Describe the Bug

The select div for a node is offset incorrectly in the resize and drag example. This side-effect leaves a clickable div so selection of nodes interfere with other nodes that overlap this div

Your Example Website or App

https://stackblitz.com/edit/react-ts-baealr?file=App.tsx

Steps to Reproduce the Bug or Issue

Copy-paste the example code

Expected behavior

The selected div should not interfere with other nodes' selection

Screenshots or Videos

image

Platform

  • Browser: Chrome latest
  • reactflow latest

Additional context

No response

hgeldenhuys avatar Jun 20 '22 21:06 hgeldenhuys

#2156

chrtze avatar Jun 22 '22 11:06 chrtze

I think this is happening because we are adding the transforms of the element (translate, rotate) to the inner element of the node. I will have a look at this asap.

chrtze avatar Jun 22 '22 12:06 chrtze

Any update on this? I'm trying to implement resizing to my custom nodes and running into this issue as well. Thanks

mlndshh avatar Jul 18 '22 23:07 mlndshh

This will be fixed with the release of v11.

chrtze avatar Sep 26 '22 14:09 chrtze

This is fixed in the new version of the Pro example: https://reactflow.dev/docs/examples/nodes/resize-rotate/

chrtze avatar Sep 28 '22 14:09 chrtze