Custom Global Events / Variable Change Listeners
I want to create custom interaction triggers / event listeners via e.g. a plugin.
My use case is that I want to be able to dispatch a custom event / set a variable on user interaction, and then listen in other parts of the prototype for this event / change to variable.
My current need is to have elements in one master (menu) interact with other masters, more specifically I wanted to have a menu item in my "menu" master dispatch an event/set a variable instead of directly manipulating the prototype (which it currently cant because the master has no knowledge of the surrounding context/parent), and then in the rest of my prototype I would be able to use the event as a trigger to show/hide layers.
Now, how is this best achieved ?
There is another request from some time ago about adding an option to listen to changes in a variable. Would that work for you too?
There is another request from some time ago about adding an option to listen to changes in a variable. Would that work for you too?
thanks for responding so quickly !
Yes, having a trigger attached to the change of the value (literal or by reference) would work for me... lets imagine we have a variable that would be "visibleState", and we can toggle between "expanded" and "collapsed", and we could trigger changes to the displayed layer by switching the variable... maybe even more elaborate it would be to switch between a set of options.
thanks for responding so quickly !
Yes, having a trigger attached to the change of the value (literal or by reference) would work for me... lets imagine we have a variable that would be "visibleState", and we can toggle between "expanded" and "collapsed", and we could trigger changes to the displayed layer by switching the variable... maybe even more elaborate it would be to switch between a set of options.
We'll add that information to our internal issue tracking.
We'll add that information to our internal issue tracking.
I would also appreciate a listener, like an event "if variable is changed to: X, then do something"
I would also appreciate a listener, like an event "if variable is changed to: X, then do something"
Replies have been locked on this page!