Skip to content

Commit

Permalink
Merge pull request #5971 from svareg/isExpanded
Browse files Browse the repository at this point in the history
Allow the layertree to be expanded by default
  • Loading branch information
sbrunner authored Jul 7, 2020
2 parents 091815a + 00b2fb3 commit e882459
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion contribs/gmf/src/layertree/component.html
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@
<ul
id="gmf-layertree-layer-group-{{::layertreeCtrl.uid}}"
ng-if="::layertreeCtrl.node.children"
ng-class="{collapse: !layertreeCtrl.isRoot, show: layertreeCtrl.node.metadata.isExpanded}"
ng-class="{collapse: !(layertreeCtrl.isRoot || gmfLayertreeCtrl.isExpanded), show: layertreeCtrl.node.metadata.isExpanded}"
ngeo-sortable="::layertreeCtrl.isRoot && layertreeCtrl.node.children"
ngeo-sortable-options="{handleClassName: 'ngeo-sortable-handle', draggerClassName: 'gmf-layertree-dragger', placeholderClassName : 'gmf-layertree-curr-drag-item'}"
ngeo-sortable-callback="::gmfLayertreeCtrl.afterReorder"
Expand Down
5 changes: 4 additions & 1 deletion contribs/gmf/src/layertree/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@ const layertreeComponent = {
bindings: {
'map': '=gmfLayertreeMap',
'dimensions': '=?gmfLayertreeDimensions',
'openLinksInNewWindow': '<?gmfLayertreeOpenlinksinnewwindow'
'openLinksInNewWindow': '<?gmfLayertreeOpenlinksinnewwindow',
'isExpanded': '<?gmfLayertreeIsexpanded'
},
template: gmfLayertreeTemplate
};
Expand Down Expand Up @@ -229,6 +230,8 @@ function Controller($element, $scope, ngeoLayerHelper,
/** @type {number} */
this.legendIconHeight;

/** @type {boolean} */
this.isExpanded;

/**
* @type {!angular.IScope}
Expand Down

0 comments on commit e882459

Please sign in to comment.