Closed flochtililoch closed 13 years ago
The offending line seems to be the if statement. I think it is merely a typo. I added some parentheses to correct the order of operations on my local copy...
if ( !(this instanceof $.imgAreaSelect) ) {
and it seems to fix the issue.
I finally had a chance to really look into this, and you're absolutely right -- the parentheses should be there. This is now fixed in the repository (and will be in the next release, which I hope to roll out in about a week). Thanks!
seems like the following code prevent events to be triggered when selection is cleared :
in cancelSelection() function :
/* If this is an API call, callback functions should not be triggered */ if (!this instanceof $.imgAreaSelect) { options.onSelectChange(img, getSelection()); options.onSelectEnd(img, getSelection()); }