mirror of
https://github.com/novnc/noVNC.git
synced 2026-06-06 12:29:38 +00:00
Add fallback value for devicePixelRatio
In IE 10 for example, devicePixelRatio doesn't exist which caused the code to fail by setting the thresholds to zero.
This commit is contained in:
@@ -617,7 +617,7 @@ var RFB;
|
||||
|
||||
// The goal is to trigger on a certain physical width, the
|
||||
// devicePixelRatio brings us a bit closer but is not optimal.
|
||||
var dragThreshold = 10 * window.devicePixelRatio;
|
||||
var dragThreshold = 10 * (window.devicePixelRatio || 1);
|
||||
|
||||
if (this._viewportHasMoved || (Math.abs(deltaX) > dragThreshold ||
|
||||
Math.abs(deltaY) > dragThreshold)) {
|
||||
|
||||
Reference in New Issue
Block a user