G6 icon indicating copy to clipboard operation
G6 copied to clipboard

Custom React Node with zoom-canvas and drag-canvas displaces the node.

Open aarpaardev opened this issue 1 year ago • 4 comments

Hello, I am using following packages version in my react typescript applciation: @antv/g6=5.0.7 @antv/g6-extension-react=0.1.2 G6 graph layout options are: layout: { type: 'd3-force', animation: true, autoFit: 'view', manyBody: { strength: -80, theta: 1 }, link: { strength: 1, } }

https://github.com/user-attachments/assets/d80377a3-b6ad-4453-9df2-b731bc0ba61d

I am using a custom react node using import { ReactNode } from '@antv/g6-extension-react'; It is span element with image/icon inside it. The issue (as seen in video) is that when using custom react nodes, canvas dragging and zooming behaviors displaces the node. Is there any way to solve it?

aarpaardev avatar Jul 14 '24 19:07 aarpaardev

Similar issues have already been reported. This is due to issues with the underlying rendering engine. You can try switching to the SVG renderer first

Aarebecca avatar Jul 15 '24 02:07 Aarebecca

I tried with SVG and WebGl renderer but still it has same issue.

aarpaardev avatar Jul 15 '24 09:07 aarpaardev

I tried with SVG and WebGl renderer but still it has same issue.

We'll fix this as soon as possible

Aarebecca avatar Jul 16 '24 09:07 Aarebecca

Looking forward to it, Thankyou.

aarpaardev avatar Jul 16 '24 12:07 aarpaardev