mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-29 00:26:10 +03:00
fix: contacts points on touch devices
Swiping fast multiple times makes contacts points in mousetracker to be out of sync for touch event Fixes #2117
This commit is contained in:
parent
2b6c8dd622
commit
47cc04ff53
@ -1400,13 +1400,22 @@
|
||||
* @function
|
||||
*/
|
||||
removeContact: function() {
|
||||
if (
|
||||
(this.type === "mouse" ||
|
||||
this.type === "pen" ||
|
||||
this.type === "touch") &&
|
||||
this.contacts > 0
|
||||
) {
|
||||
--this.contacts;
|
||||
|
||||
if (this.contacts < 0) {
|
||||
$.console.warn('GesturePointList.removeContact() Implausible contacts value');
|
||||
$.console.warn(
|
||||
"GesturePointList.removeContact() Implausible contacts value"
|
||||
);
|
||||
this.contacts = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -2823,10 +2832,7 @@
|
||||
// If child element relinquishes capture to a parent we may get here
|
||||
// from a pointerleave event while a pointerup event will never be received.
|
||||
// In that case, we'll clean up the contact count
|
||||
if ( (pointsList.type === 'mouse' || pointsList.type === 'pen') &&
|
||||
pointsList.contacts > 0 ) {
|
||||
pointsList.removeContact();
|
||||
}
|
||||
|
||||
listLength = pointsList.removeById( gPoint.id );
|
||||
} else {
|
||||
|
@ -25,7 +25,7 @@
|
||||
// debugMode: true,
|
||||
id: "contentDiv",
|
||||
prefixUrl: "../../build/openseadragon/images/",
|
||||
tileSources: "http://wellcomelibrary.org/iiif-img/b11768265-0/a6801943-b8b4-4674-908c-7d5b27e70569/info.json",
|
||||
tileSources: "https://iiif.wellcomecollection.org/image/V0021191/info.json",
|
||||
showNavigator:true
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user