diff options
author | Jan Holesovsky <kendy@collabora.com> | 2020-09-15 21:33:14 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2020-09-17 15:03:01 +0200 |
commit | f0b63eb7654d78b47958e300613591d016485f21 (patch) | |
tree | 0a022f84c9d151109ab55d4fe95d34cf50c8bd36 | |
parent | f668b590010f4487a1dd1f7171131334fb98d908 (diff) |
split panes: No split lines at all when they are at 0 position.
Change-Id: I9fee28f32acdabd4768b095a471f26e5e8e9a378
-rw-r--r-- | loleaflet/src/layer/vector/SplitterLine.js | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/loleaflet/src/layer/vector/SplitterLine.js b/loleaflet/src/layer/vector/SplitterLine.js index c8ad0409c..9a8d25523 100644 --- a/loleaflet/src/layer/vector/SplitterLine.js +++ b/loleaflet/src/layer/vector/SplitterLine.js @@ -2,7 +2,7 @@ /* * L.SplitterLine is a draggable L.Rectangle to be used as control for split-panes. */ -/* global $ */ + L.SplitterLine = L.Rectangle.extend({ options: { @@ -43,14 +43,20 @@ L.SplitterLine = L.Rectangle.extend({ var xmin = isHoriz ? splitPos.x - thickness/2 : -size.x; var xmax = isHoriz ? splitPos.x + thickness/2 : size.x; - if (!this._dragStarted && splitPos.y == 0 && !isHoriz) - xmax = thickness/2; + // No split line when it is at the zero position + if (!this._dragStarted && splitPos.y == 0 && !isHoriz) { + xmin = 0; + xmax = 0; + } var ymin = !isHoriz ? splitPos.y - thickness/2 : -size.y; var ymax = !isHoriz ? splitPos.y + thickness/2 : size.y; - if (!this._dragStarted && splitPos.x == 0 && isHoriz) - ymax = thickness/2; + // No split line when it is at the zero position + if (!this._dragStarted && splitPos.x == 0 && isHoriz) { + ymin = 0; + ymax = 0; + } return new L.LatLngBounds( map.unproject(new L.Point(xmin, ymin)), @@ -72,7 +78,6 @@ L.SplitterLine = L.Rectangle.extend({ }.bind(this)); this.addClass('leaflet-pane-splitter'); - $('.leaflet-pane-splitter').parent().css('overflow', 'visible'); this._map.on('zoomlevelschange', this.update, this); }, |