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

adding new too many plugins didn't adjust tab content width (with multi lines of links)

parent 9c3d82e1
No related branches found
No related tags found
1 merge request!741Resolve "freeze top bar of plugin panel in case multiple plugins are loaded"
Pipeline #9752 passed
......@@ -49,6 +49,8 @@ minerva (12.3.0~alpha.0) unstable; urgency=low
list of genomes (#761)
* Bug fix: fixing situation when Molart started with variation overlay not
having the aa change information
* Bug fix: plugin contect element width is adjusted when link to tabs are
wrapped in more than one line (#758)
minerva (12.2.2) stable; urgency=medium
* Bug fix: downloading overlays didn't work from admin panel when project
......
......@@ -78,6 +78,7 @@ PluginManager.prototype.addPlugin = function (options) {
self.getGuiUtils().addTab(self, {name: "PLUGIN", content: element});
var oldLinkHeight = $(".nav-tabs", self.getElement()).height();
var plugin;
return Promise.resolve().then(function () {
if (options instanceof Plugin) {
......@@ -120,8 +121,15 @@ PluginManager.prototype.addPlugin = function (options) {
}
return self.adjustMinWidth();
}).then(function () {
var newLinkHeight = $(".nav-tabs", self.getElement()).height();
if (self._plugins.length === 1) {
return self.getMap().getMapCanvas().triggerListeners("resize");
} else if (oldLinkHeight !== newLinkHeight) {
for (var key in self._pluginOnResizeHandlers) {
if (self._pluginOnResizeHandlers.hasOwnProperty(key)) {
self._pluginOnResizeHandlers[key]();
}
}
}
}).then(function () {
return plugin;
......
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