Open AlexDarbyFujitsuGmail opened 6 years ago
Hopefully @picturae can help out, but if not, you might try looking at the MouseTracker handlers in selection.js.
Issue is fixed by on cancel calling
this.outerTracker.setTracking(false); this.outerTracker.setTracking(true);
So I am not sure what needs to be changed but it solves the problem
Good find! It would be nice to know why that fixes it, but even adding it to this plugin as is might be an improvement.
I will make a quick pull request in a min for this fix
@iangilman seems that the pointers are not being reset correctly. I have managed to so far narrow it down to clearTrackedPointers(tracker)
. If you add the below passthrough to $.MouseTracker.prototype it also fixes the issue.
selection.js
cancel: function() {
/*
* These two lines have been added to fix a issue with mobile where the selection is just a pinpoint after the first drag
* For some reason disabling then re-enabling the tracking fixes this issue.
*/
this.outerTracker.clearPoints();
this.viewer.raiseEvent('selection_cancel', false);
return this.undraw();
},
$.MouseTracker.prototype from openseadragon.js
clearPoints: function() {
clearTrackedPointers(this);
},
My suggestion would be to either look at how the trackers are handled or add an option to call this on trackers into openseadragon at least as a fix for now as well as for more power to addons.
@sekwah41 sounds promising. @msalsbery do you have any thoughts on the above?
There is a issue which happens after a image selection has been made.
To reproduce: