diff --git a/frontend-js/src/main/css/global.css b/frontend-js/src/main/css/global.css index 53d094025ecdb917f1c7b9e29a42ce71e2e0e5fd..bd26e89980185373a068b2959e28d56f8cc49b1c 100644 --- a/frontend-js/src/main/css/global.css +++ b/frontend-js/src/main/css/global.css @@ -378,6 +378,12 @@ table.minerva-window-drug-table td { border: 1px solid black; } +.minerva-root { + display: table; + width: 100%; + height: 100%; +} + .minerva-left-panel { display: table-cell; position: relative; @@ -400,6 +406,32 @@ table.minerva-window-drug-table td { line-height: 24px; } +.minerva-middle-panel { + display: table-cell; + height: 100%; + width: 100%; +} + +.minerva-middle-panel > div { + height: 100%; + width: 100%; + position: relative; +} + +.minerva-plugin-split-bar { + width: 5px; + height: 100%; + clear: both; + display: table-cell; + vertical-align: top; + border-left: 1px dotted gray; + cursor: col-resize; +} + +.minerva-plugin { + display: table-cell; +} + .minerva-annotation-row-odd { padding: 5px; background-color: #EAEAEA; diff --git a/frontend-js/src/main/js/minerva.js b/frontend-js/src/main/js/minerva.js index be76c9e0411cb4a2af9d89c52954cab40c5a2e94..21c9d9f889f942873c322f7b3a9f626d33b86ee2 100644 --- a/frontend-js/src/main/js/minerva.js +++ b/frontend-js/src/main/js/minerva.js @@ -147,7 +147,7 @@ function insertGoogleAnalyticsCode() { function createDivStructure(element) { var tableDiv = functions.createElement({ type: "div", - style: "display: table; width:100%; height: 100%" + className: "minerva-root" }); element.appendChild(tableDiv); var leftPanelDiv = functions.createElement({ @@ -158,21 +158,19 @@ function createDivStructure(element) { tableDiv.appendChild(leftPanelDiv); var middlePanelDiv = functions.createElement({ type: "div", - style: "display: table-cell;height:100%;width:100%;", + className: "minerva-middle-panel", name: "minerva-middle-panel" }); tableDiv.appendChild(middlePanelDiv); - var middlePanelContainerDiv = functions.createElement({ - type: "div", - style: "height:100%;width:100%;position:relative" - }); + //this container is required because google maps API modifies DOM and it will crash + var middlePanelContainerDiv = functions.createElement({type: "div"}); middlePanelDiv.appendChild(middlePanelContainerDiv); var splitBar = functions.createElement({ type: "div", name: "minerva-plugin-split-bar", - style: "width:5px;height:100%;clear: both;display: table-cell;vertical-align:top;border-left:1px dotted gray;cursor:col-resize", + className: "minerva-plugin-split-bar", content: " " }); element.appendChild(splitBar); @@ -180,7 +178,6 @@ function createDivStructure(element) { var rightPanelDiv = functions.createElement({ type: "div", className: "minerva-plugin", - style: "display: table-cell;", name: "minerva-plugin-div" }); element.appendChild(rightPanelDiv); @@ -321,7 +318,7 @@ function create(params) { promise = functions.loadScript("https://maps.google.com/maps/api/js?libraries=drawing&key=" + params.getConfiguration().getOption(ConfigurationType.GOOGLE_MAPS_API_KEY).getValue()); } return promise; - }).then(function(){ + }).then(function () { var element = params.getElement(); verifyBrowser();