diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2020-09-10 12:47:42 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2020-09-17 15:03:01 +0200 |
commit | f9cfed47d48a4aa7cb2b93f159871830ddef0add (patch) | |
tree | 40a81714735d5f973253c86a74c97778c66b3cdd /loleaflet | |
parent | 284e8ce308f2e8a3ea124f93fb7f8c27fbed0910 (diff) |
Adjust splitline thickness according to zoom level
Change-Id: I33c398f1545860fb2f77d9d8dcdd8f632c2603ca
Diffstat (limited to 'loleaflet')
-rw-r--r-- | loleaflet/src/layer/vector/SplitterLine.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/loleaflet/src/layer/vector/SplitterLine.js b/loleaflet/src/layer/vector/SplitterLine.js index 547663fe7..c8ad0409c 100644 --- a/loleaflet/src/layer/vector/SplitterLine.js +++ b/loleaflet/src/layer/vector/SplitterLine.js @@ -38,7 +38,7 @@ L.SplitterLine = L.Rectangle.extend({ this._lastPos = isHoriz ? splitPos.x : splitPos.y; - var thickness = 4; + var thickness = 4 * 10 / map._zoom; var xmin = isHoriz ? splitPos.x - thickness/2 : -size.x; var xmax = isHoriz ? splitPos.x + thickness/2 : size.x; @@ -73,6 +73,8 @@ L.SplitterLine = L.Rectangle.extend({ this.addClass('leaflet-pane-splitter'); $('.leaflet-pane-splitter').parent().css('overflow', 'visible'); + + this._map.on('zoomlevelschange', this.update, this); }, _onDragStart: function(evt) { |