Closed ebressert closed 13 years ago
I've made a start by defining a bind() function that behaves a little like jQuery's bind(). At the moment it accepts 3 possibilities: "move" (any move, not just a mouse drop), "slide" (whenever a wavelength changes) and "zoom" (any zoom). These will call your function using the chromoscope object as the "this" context. e.g.
chromo.bind("slide",function(){ console.log('Slid '+this.lambda); }).bind("zoom",function(){ console.log('Zoomed'); }).bind("move",function(){ console.log('Moved map'); })
I've added a "wcsupdate" event that fires when the coordinate label is updated (regardless of if it is being shown).
Add a listener that catches multiple events from Chromoscope.