antvis / G6

♾ A Graph Visualization Framework in JavaScript.
https://g6.antv.antgroup.com/
MIT License
11.16k stars 1.33k forks source link

G6 V5: How do I set the location of a custom node in a custom combo? #6507

Closed lhz7695001 closed 1 week ago

lhz7695001 commented 1 week ago

Describe the bug / 问题描述

image image image

Reproduction link / 重现链接

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

yvonneyx commented 1 week ago

设置节点坐标遵循此格式 { id: 'node-1', style: { x: 42, y: 42 }} 另外 combo 位置由内部元素决定

lhz7695001 commented 1 week ago

style: { x: 42, y: 42 }

image 我就是这样设置的,改变node的x,y坐标,和所在combo的相对位置不发生变化,变化的知识combo的位置,很奇怪

Aarebecca commented 1 week ago

combo与其内部的节点相对位置无法精确调整,只能通过设置padding