想要修改节点和边的边框样式 #1254
cfc3058353263
started this conversation in
General
想要修改节点和边的边框样式
#1254
Replies: 2 comments 1 reply
-
1、model上没有fill属性,样式都放在了model.style里,设置model.fill不会生效 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
使用版本 v1.2.10
使用以下方法无效
lf.on('node:click', ({ data }) => {
const model = lf.graphModel.getElement(data.id)
model.fill = 'red'
})
使用该方法只能修改fill样式不能修改stroke样式
let node = lf.getNodeModelById(item.key);
node && node.setStyles({ stroke: '#000', fill: '#edd48ec9' });
Beta Was this translation helpful? Give feedback.
All reactions