Hi,
I am not an expert (yet) so i don´t know if this solution is overkill, but if you are talking about different "objects" that somehow are behaviour dependent, you can use "can.compute" to implement an observable to "mousedown" event, something like:
Linton Fernandes
I am not an expert (yet) so i don´t know if this solution is overkill, but if you are talking about different "objects" that somehow are behaviour dependent, you can use "can.compute" to implement an observable to "mousedown" event, something like:
Cheers,var mousedown = can.compute(false);You can share also this computes between controls (if that fits to your case):
#id1 mousedown': function(){mousedown(true);}'{mousedown} change': function(){ ... }do whatever you want change is true;
do whaterver you want if change is false;});
mousedown = can.compute(false);
new AControl('element', {mousedown: mousedown})
new BControl('element', {mousedown: mousedown})
In AControl you can set mousedown value: mousedown(true);
In BControl you can listen for mousedown change: "{mousedown} change": function(){...}
Linton Fernandes