You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This tutorial introduces how to design your custom node: https://g6.antv.antgroup.com/manual/element/node/custom-node#实现节点
My understanding is that, in order to make each node appear differently according to the node's internal state, you have to attach that specific state to the node's style attributes, and use the attributes to draw different nodes.
However in my situation, I want to use the node's data instead of style to draw different shapes (for example, draw ERD entities), but there are no extant methods to get that data.
I found that possibly I can get the graph from BaseElement's context, but I still need the node's ID to get the node's data.
In my situation, are the only viable methods the following two?
use React node ( which is not viable because my project is not a React project)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
This tutorial introduces how to design your custom node:
https://g6.antv.antgroup.com/manual/element/node/custom-node#实现节点
My understanding is that, in order to make each node appear differently according to the node's internal state, you have to attach that specific state to the node's style attributes, and use the attributes to draw different nodes.
However in my situation, I want to use the node's
data
instead ofstyle
to draw different shapes (for example, draw ERD entities), but there are no extant methods to get thatdata
.I found that possibly I can get the
graph
fromBaseElement
'scontext
, but I still need thenode
'sID
to get the node's data.In my situation, are the only viable methods the following two?
data
to itsstyle
field.Beta Was this translation helpful? Give feedback.
All reactions