[Libreoffice-commits] online.git: Branch 'feature/calc-canvas' - loleaflet/src

Szymon KÅ‚os (via logerrit) logerrit at kemper.freedesktop.org
Thu Sep 10 10:48:06 UTC 2020


 loleaflet/src/layer/vector/SplitterLine.js |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 35ee829df5522102c55433c29866dab719aa1015
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Thu Sep 10 12:47:42 2020 +0200
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Thu Sep 10 12:47:42 2020 +0200

    Adjust splitline thickness according to zoom level
    
    Change-Id: I33c398f1545860fb2f77d9d8dcdd8f632c2603ca

diff --git a/loleaflet/src/layer/vector/SplitterLine.js b/loleaflet/src/layer/vector/SplitterLine.js
index b076b7e66..0f4800ade 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) {


More information about the Libreoffice-commits mailing list