Occurs to me that linking axis' should be done declaratively without needing a brush.
Something like
link(fig.x, fig2.x);
Then they should both subscribe to each others link-axis change events, or maybe have a single event broker. Point there is that there is a difference between saying "My axis has changed" and "the linked axis has changed".
link-axis tells the Figure that someone else has modified the linked axis. axis-change is the event that the Figure fires off to essentially it's children. So while they both would fire, they are subtley different. You need to separate them out so you don't run into a non-sensical situation where Figures are pinging eachother back, notifiying each other that the axis has changed.
Occurs to me that linking axis' should be done declaratively without needing a brush.
Something like
Then they should both subscribe to each others link-axis change events, or maybe have a single event broker. Point there is that there is a difference between saying "My axis has changed" and "the linked axis has changed".
link-axis
tells the Figure that someone else has modified the linked axis.axis-change
is the event that the Figure fires off to essentially it's children. So while they both would fire, they are subtley different. You need to separate them out so you don't run into a non-sensical situation where Figures are pinging eachother back, notifiying each other that the axis has changed.