diff --git a/examples/feature-examples/src/pages/graph/index.tsx b/examples/feature-examples/src/pages/graph/index.tsx index 7710ab78a..a4403b2ed 100644 --- a/examples/feature-examples/src/pages/graph/index.tsx +++ b/examples/feature-examples/src/pages/graph/index.tsx @@ -99,9 +99,7 @@ const data = { properties: { width: 80, height: 120, - style: { - radius: 20, - }, + radius: 20, }, }, { @@ -393,6 +391,21 @@ export default function BasicNode() { lfRef?.current?.dnd.startDrag(node) } + const changeNodeBorderColor = () => { + const lf = lfRef.current + if (lf) { + const { nodes } = lf.getSelectElements() + nodes.forEach(({ id, properties }) => { + console.log('properties', properties) + lf.setProperties(id, { + style: { + stroke: 'pink', + }, + }) + }) + } + } + return ( @@ -445,6 +458,13 @@ export default function BasicNode() { +