-
IntroductionI've been overthinking this I think ... I have a graph (boxes and lines) and I want to add a little traffic light to the "first" node in the graph.
This works well, but I haven't figured out how to change the markup, e.g. how to take the traffic lights away if the entity that the rectangle represents changes. Maybe a static function that directly manipulates the markup? Steps to reproduceNo response Restrictions & ConstraintsNo response Does your question relate to JointJS or JointJS+. Select both if applicable.JointJS |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Solved :)
and then I can turn the traffic lights on and off, and set the color:
|
Beta Was this translation helpful? Give feedback.
-
This is very cool - probably what I should have done to start with :) I have a few other use cases that highlighters will work perfectly with, thanks!
… On 15 Apr 2024, at 05:58, Roman Bruckner ***@***.***> wrote:
You might also check out this example: https://www.jointjs.com/demos/dynamic-status-icons
It is using a custom highlighter (specifically a custom list <https://resources.jointjs.com/docs/jointjs/v4.0/joint.html#highlighters.list> highlighter). The advantage of this solution is that you can add it to an arbitrary shape without modifying its markup.
—
Reply to this email directly, view it on GitHub <#2619 (reply in thread)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABDXCQKFKGVBZLGU4FAX7YDY5NM5XAVCNFSM6AAAAABGGHIGZOVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TCMJTGQ2TQ>.
You are receiving this because you modified the open/close state.
|
Beta Was this translation helpful? Give feedback.
Solved :)