asgeo1/zui53 — comment on commit 619242f2c383558df524308f4d15ba3b411ad0c2
File:  line 0
By asgeo1:

Well, I don't think it's a good idea to unbind the events unnecessarily - it's more efficient to leave them bound. As well, there's kind of a dependency there - JS events are executed in the order they are bound. So if I have other events bound to those elements, then I will be re-ordering the event stack by attach/detaching, which may not be what I want to do.

Jquery UI uses the same enable/disable approach with their widgets, rather than tearing down the events. It works pretty well.

I still need to make the same change to the zoom tool as well, but haven't gotten around to it.