diff --git a/geoportal/geomapfish_geoportal/static-ngeo/js/apps/Controllerdesktop.js b/geoportal/geomapfish_geoportal/static-ngeo/js/apps/Controllerdesktop.js index c6fa15b52..960fd1d4c 100644 --- a/geoportal/geomapfish_geoportal/static-ngeo/js/apps/Controllerdesktop.js +++ b/geoportal/geomapfish_geoportal/static-ngeo/js/apps/Controllerdesktop.js @@ -35,11 +35,47 @@ import gmfControllersAbstractDesktopController, { AbstractDesktopController, } from 'gmf/controllers/AbstractDesktopController'; import geomapfishBase from '../geomapfishmodule'; +import ngeoMiscToolActivate from 'ngeo/misc/ToolActivate'; +import panels from 'gmfapi/store/panels'; /** * @private */ class Controller extends AbstractDesktopController { + constructor($scope, $injector) { + super($scope, $injector); + + const $timeout = $injector.get('$timeout'); + + // Open the 'web-component' lidar panel + $scope.$watch( + () => this.drawLidarprofilePanelActive, + (newVal) => { + if (newVal) { + panels.openToolPanel('lidar'); + } else { + panels.closeToolPanel(); + } + } + ); + + // Make visible the footer + panels.getActiveFooterPanel().subscribe({ + next: (panel) => { + this.lidarProfileFooterActive = panel === 'lidar'; + $timeout(() => {}); // this triggered on DOM click, we call $timeout to force Angular diggest + }, + }); + + /** + * @type {boolean} + */ + this.drawLidarprofilePanelActive = false; + + const drawLidarprofilePanelActive = new ngeoMiscToolActivate(this, 'drawLidarprofilePanelActive'); + this.ngeoToolActivateMgr.registerTool('mapTools', drawLidarprofilePanelActive, false); + } + /** * @param {JQuery.Event} event keydown event. */ diff --git a/geoportal/geomapfish_geoportal/static-ngeo/js/apps/desktop.html.ejs b/geoportal/geomapfish_geoportal/static-ngeo/js/apps/desktop.html.ejs index 0f2fd917c..176350cad 100644 --- a/geoportal/geomapfish_geoportal/static-ngeo/js/apps/desktop.html.ejs +++ b/geoportal/geomapfish_geoportal/static-ngeo/js/apps/desktop.html.ejs @@ -12,7 +12,7 @@ <% } %> - +
<%=require('gmf/icons/spinner.svg?viewbox&height=1em')%> @@ -82,6 +82,10 @@ data-toggle="tooltip" data-placement="left" data-original-title="{{'Profile'|translate}}"> +
+
+
+ × + +
+
@@ -316,6 +326,7 @@