Skip to content
Snippets Groups Projects
Commit 8375fcda authored by Piotr Gawron's avatar Piotr Gawron
Browse files

when plugin is load for the first time map is resized properly

parent 5baea769
No related branches found
No related tags found
1 merge request!328Resolve "after first plugin is loaded openlayers become squeezed"
Pipeline #
...@@ -103,6 +103,10 @@ PluginManager.prototype.addPlugin = function (options) { ...@@ -103,6 +103,10 @@ PluginManager.prototype.addPlugin = function (options) {
GuiConnector.addWindowResizeEvent(adjustHeight); GuiConnector.addWindowResizeEvent(adjustHeight);
adjustHeight(); adjustHeight();
return self.adjustMinWidth(); return self.adjustMinWidth();
}).then(function () {
if (self._plugins.length === 1) {
return self.getMap().getMapCanvas().triggerListeners("resize");
}
}).then(function () { }).then(function () {
return plugin; return plugin;
}); });
...@@ -122,7 +126,7 @@ PluginManager.prototype.createTabForPlugin = function () { ...@@ -122,7 +126,7 @@ PluginManager.prototype.createTabForPlugin = function () {
self.getElement().style.height = "100%"; self.getElement().style.height = "100%";
self.getElement().style.position = "relative"; self.getElement().style.position = "relative";
self._tabData = guiUtils.createTabDiv({element: self.getElement(), id: "plugin_tab"}); self._tabData = guiUtils.createTabDiv({element: self.getElement(), id: "plugin_tab"});
tabData = self._tabData; tabData = self._tabData;
$(tabData.element).css('position', 'absolute'); $(tabData.element).css('position', 'absolute');
$(tabData.element).css('top', '0'); $(tabData.element).css('top', '0');
$(tabData.element).css('width', '100%'); $(tabData.element).css('width', '100%');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment