mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 511898: Double-click with two clicks on different areas of the page results in zoom of area of second click [r=combee]
This commit is contained in:
parent
dd01aa90bf
commit
0e7bc42476
@ -1529,8 +1529,12 @@ ContentCustomClicker.prototype = {
|
||||
},
|
||||
|
||||
doubleClick: function doubleClick(cX1, cY1, cX2, cY2) {
|
||||
if (!Browser.zoomToPoint(cX2, cY2))
|
||||
Browser.zoomFromPoint(cX2, cY2);
|
||||
const kDoubleClickRadius = 32;
|
||||
|
||||
let maxRadius = kDoubleClickRadius * Browser._browserView.getZoomLevel();
|
||||
let isClickInRadius = (Math.abs(cX1 - cX2) < maxRadius && Math.abs(cY1 - cY2) < maxRadius);
|
||||
if (isClickInRadius && !Browser.zoomToPoint(cX1, cY1))
|
||||
Browser.zoomFromPoint(cX1, cY1);
|
||||
},
|
||||
|
||||
toString: function toString() {
|
||||
|
Loading…
Reference in New Issue
Block a user