odyniec/imgareaselect — Issue #17: should have callback for cancelSelection event
Author: placenamehere
Created: 2012-03-01 20:08:49+00:00
State: open

currently, when cancelSelection() is triggered (such as when the area outside the region is clicked) there isn't a callback that you could use to trigger other cleanup events.

An example where this would be useful is if you want to show some additional UI only when there is an active region. There are existing callback for Start/End so you could use one of those to display the additional UI, but there isn't an appropriate hook to use to then hide it.

Probably as easy as adding an options.onSelectCancel() call in function cancelSelection(), but I haven't tested that solution. If I have time, and wind up that I do need it for this project I'm on, I may for and do just that.