summaryrefslogtreecommitdiffstats
path: root/browser/src/map/handler
diff options
context:
space:
mode:
authorDennis Francis <dennis.francis@collabora.com>2021-11-18 10:24:48 +0530
committerAndras Timar <andras.timar@collabora.com>2022-01-11 21:21:27 +0100
commitad7b97e092f0b8f7353020c2c00dcc2032a059e4 (patch)
tree62dec7c4d6a5a7ec9beeda35146e3acd7a1a8b8d /browser/src/map/handler
parentcalcRTL: RTL adjustment for containerPointToLayerPoint (diff)
downloadonline-ad7b97e092f0b8f7353020c2c00dcc2032a059e4.tar.gz
online-ad7b97e092f0b8f7353020c2c00dcc2032a059e4.zip
calcRTL: RTL adjustment for mouse selection
Signed-off-by: Dennis Francis <dennis.francis@collabora.com> Change-Id: I2e43d1044ef6903f12eec18ca91ff0928899d0bd
Diffstat (limited to 'browser/src/map/handler')
-rw-r--r--browser/src/map/handler/Map.Mouse.js10
1 files changed, 2 insertions, 8 deletions
diff --git a/browser/src/map/handler/Map.Mouse.js b/browser/src/map/handler/Map.Mouse.js
index 5db391724c..990a5f4ebf 100644
--- a/browser/src/map/handler/Map.Mouse.js
+++ b/browser/src/map/handler/Map.Mouse.js
@@ -3,8 +3,6 @@
* L.Map.Mouse is handling mouse interaction with the document
*/
-/* global app */
-
L.Map.mergeOptions({
mouse: true
});
@@ -184,12 +182,8 @@ L.Map.Mouse = L.Handler.extend({
this._mouseEventsQueue = [];
}
if (!this._map.dragging.enabled()) {
- mousePos = [e.containerPoint.x * app.dpiScale, e.containerPoint.y * app.dpiScale];
- var docTopLeft = app.sectionContainer.getDocumentTopLeft();
- mousePos = [mousePos[0] + docTopLeft[0], mousePos[1] + docTopLeft[1]];
- mousePos = [Math.round(mousePos[0] * app.pixelsToTwips), Math.round(mousePos[1] * app.pixelsToTwips)];
-
- docLayer._postMouseEvent('move', mousePos[0], mousePos[1], 1, buttons, modifier);
+ mousePos = docLayer._latLngToTwips(e.latlng);
+ docLayer._postMouseEvent('move', mousePos.x, mousePos.y, 1, buttons, modifier);
for (key in docLayer._selectionHandles) {
handle = docLayer._selectionHandles[key];