[Libreoffice-commits] online.git: loleaflet/src
Ashod Nakashian (via logerrit)
logerrit at kemper.freedesktop.org
Wed Feb 26 00:33:01 UTC 2020
loleaflet/src/layer/tile/TileLayer.js | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
New commits:
commit af58e1975028d1f35171b94b1a1393814607d023
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Wed Feb 19 09:47:56 2020 -0500
Commit: Ashod Nakashian <ashnakash at gmail.com>
CommitDate: Wed Feb 26 01:32:38 2020 +0100
leaflet: remove redundant check
Map.editorHasFocus() implies map.getWinId === 0.
Change-Id: I522a377df095683453d2499a87485465437f9abb
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89356
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js
index a0fff8280..3ff3e8a58 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -1135,7 +1135,7 @@ L.TileLayer = L.GridLayer.extend({
.openOn(this._map);
}
- if (!this._map.editorHasFocus() && (modifierViewId === this._viewId) && (this._map.getWinId === 0) && (this._map._permission === 'edit')) {
+ if (!this._map.editorHasFocus() && (modifierViewId === this._viewId) && (this._map._permission === 'edit')) {
// Regain cursor if we had been out of focus and now have input.
// (only if it is our own cursor and the input is actually not
// going into a dialog)
@@ -2108,8 +2108,7 @@ L.TileLayer = L.GridLayer.extend({
var updated = true;
if (!this._cursorMarker) {
this._cursorMarker = L.cursor(cursorPos, pixBounds.getSize().multiplyBy(this._map.getZoomScale(this._map.getZoom())), {blink: true});
- }
- else {
+ } else {
var oldLatLng = this._cursorMarker.getLatLng();
this._cursorMarker.setLatLng(cursorPos, pixBounds.getSize().multiplyBy(this._map.getZoomScale(this._map.getZoom())));
var newLatLng = this._cursorMarker.getLatLng();
More information about the Libreoffice-commits
mailing list