Control.sidebar: Resize document-container when sidebar is closed & opened.

Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: I20d406718c16cbad17e65d6c381717423e08afc6
This commit is contained in:
Gökay ŞATIR 2021-07-09 12:15:32 +03:00
parent e21637e6be
commit af08ff61ff

View file

@ -29,7 +29,7 @@ L.Control.Sidebar = L.Control.extend({
closeSidebar: function() {
$('#sidebar-dock-wrapper').hide();
$('#sidebar-dock-wrapper').width(0);
this.map.options.documentContainer.style.right = '0px';
this.map.options.documentContainer.style.width = 'calc(100% - 194px)';
this.map._onResize();
this.map.dialog._resizeCalcInputBar(0);
@ -113,7 +113,7 @@ L.Control.Sidebar = L.Control.extend({
if ($('#sidebar-dock-wrapper').width() != sidebarWidth) {
$('#sidebar-dock-wrapper').show();
$('#sidebar-dock-wrapper').width(sidebarWidth);
this.map.options.documentContainer.style.right = sidebarWidth + 'px';
this.map.options.documentContainer.style.width = 'calc(100% - 530px)';
this.map._onResize();
this.map.dialog._resizeCalcInputBar(sidebarWidth);
}