antvis/G6

In V5, how do I set the coordinates of a node by obtaining the bounding box of the node when drawing a node? #6498

lhz7695001 posted onGitHub

Describe the bug / 问题描述

image 这个是我写的,但是会调用两次upsert方法,有更好的方法吗

No response

Steps to Reproduce the Bug or Issue / 重现步骤

No response

G6 Version / G6 版本

🆕 5.x

Operating System / 操作系统

macOS

Browser / 浏览器

Chrome

Additional context / 补充说明

No response


这么写是可以的, upsert 会检查该图形是否存在,不存在则创建,存在则更新。因此这里调用两次不会导致重新创建元素

posted by Aarebecca 5 months ago

这么写是可以的, upsert 会检查该图形是否存在,不存在则创建,存在则更新。因此这里调用两次不会导致重新创建元素

好的,感谢~~

posted by lhz7695001 5 months ago

Fund this Issue

$0.00
Funded

Pull requests