antvis / g6-editor

532 stars 172 forks source link

文档能否完善一下,比如锚点cfg具体配置 #84

Open Lost-Kun opened 5 years ago

powerProgrammerMa commented 5 years ago

请问一下你能配置锚点了吗? 他现在默认是四个 我想一个节点只有左右两个锚点 能配置吗?

DirtyHao commented 5 years ago

请问一下你能配置锚点了吗? 他现在默认是四个 我想一个节点只有左右两个锚点 能配置吗?

G6Editor.Flow.registerNode('flow-xxx', { anchor: [], })

Lost-Kun commented 5 years ago

嗯嗯,可以配置的,如下便是左右两个锚点 anchor: [ [0, 0.5, { type: 'input', }], [1, 0.5, { type: 'output', }], ]

papibabi commented 5 years ago

嗯嗯,可以配置的,如下便是左右两个锚点 anchor: [ [0, 0.5, { type: 'input', }], [1, 0.5, { type: 'output', }], ]

可以配置大于4个的吗,比如 8 个,我发现锚点有点不够用。。或者可以给边加锚点吗,可以拖拽调整边的位置

PXX-96 commented 4 years ago

G6Editor.Flow.registerNode('flow-xxx', { anchor: [], }) 这个配置是写在那个文件里面的?我写在Page.jsx文件里面出不来,它里面已经new G6Editor.Flow