문제

I have a node of a SpaceTree graph (from the JIT library) and I'd like to modify the HTML of its label in a click listener. This would be trivial if I had a reference to the label object that is passed as a parameter to the onPlaceLabel() and onCreateLabel() functions, but I cannot find a way to get a reference. Is there an easy way of obtaining that reference from a node object?

도움이 되었습니까?

해결책

I figured it out. You can get the the label of a node using

st.labels.getLabel(node.id)

Assuming st is the SpaceTree object and node is the node for which to get the label.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top