Skip to content

Commit

Permalink
Merge pull request #5550 from camptocamp/GSGMF-1217
Browse files Browse the repository at this point in the history
Deactivate query when routing panel is open
  • Loading branch information
fredj committed Feb 21, 2020
2 parents 2c75b50 + f1c3b3a commit 643c7e0
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
6 changes: 3 additions & 3 deletions contribs/gmf/apps/desktop_alt/index.html.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
data-toggle="tooltip" data-placement="left" data-original-title="{{'Import Layer'|translate}}">
<span class="fa fa-upload"></span>
</button>
<button ngeo-btn class="btn btn-default" ng-model="mainCtrl.routingfeatureActive"
<button ngeo-btn class="btn btn-default" ng-model="mainCtrl.routingPanelActive"
data-toggle="tooltip" data-placement="left" data-original-title="{{'Routing'|translate}}">
<span class="fa fa-map-signs"></span>
</button>
Expand Down Expand Up @@ -256,11 +256,11 @@
</gmf-importdatasource>
</div>
</div>
<div ng-show="mainCtrl.routingfeatureActive" class="row">
<div ng-show="mainCtrl.routingPanelActive" class="row">
<div class="col-sm-12">
<div class="gmf-app-tools-content-heading">
{{'Routing'|translate}}
<a class="btn close" ng-click="mainCtrl.routingfeatureActive = false">&times;</a>
<a class="btn close" ng-click="mainCtrl.routingPanelActive = false">&times;</a>
</div>
<ngeo-routing
ngeo-routing-map="mainCtrl.map">
Expand Down
8 changes: 8 additions & 0 deletions contribs/gmf/src/controllers/AbstractAppController.js
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,11 @@ export function AbstractAppController(config, map, $scope, $injector) {
*/
this.drawProfilePanelActive = false;

/**
* @type {boolean}
*/
this.routingPanelActive = false;

/**
* @type {import('gmf/authentication/Service.js').User}
*/
Expand Down Expand Up @@ -514,6 +519,9 @@ export function AbstractAppController(config, map, $scope, $injector) {
const contextdataActivate = new ngeoMiscToolActivate(this, 'contextdataActive');
ngeoToolActivateMgr.registerTool(mapTools, contextdataActivate, false);

const routingPanelActive = new ngeoMiscToolActivate(this, 'routingPanelActive');
ngeoToolActivateMgr.registerTool(mapTools, routingPanelActive, false);

$scope.$root.$on(ThemeEventType.THEME_NAME_SET, (event, name) => {
this.gmfThemes_.getThemeObject(name).then((theme) => {
this.setDefaultBackground_(theme);
Expand Down
5 changes: 0 additions & 5 deletions contribs/gmf/src/controllers/AbstractDesktopController.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,6 @@ export class AbstractDesktopController extends AbstractAPIController {
*/
this.queryPanelActive = false;

/**
* @type {boolean}
*/
this.routingfeatureActive = false;

/**
* @type {boolean}
*/
Expand Down
2 changes: 1 addition & 1 deletion examples/routing.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function MainController() {
/**
* @type {boolean}
*/
this.routingfeatureActive = true;
this.routingPanelActive = true;
}

module.controller('MainController', MainController);
Expand Down

0 comments on commit 643c7e0

Please sign in to comment.