Skip to content
This repository was archived by the owner on Dec 21, 2017. It is now read-only.

Commit d5be93d

Browse files
committed
place layer visibility above legend
scroll legend if too long
1 parent bd724ef commit d5be93d

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

app/app.component.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,15 @@ import { LayerComponent } from './layer.component';
1717
</div>
1818
<div class="col-sm-4 col-md-3 col-lg-2">
1919
<h3>{{title}}</h3>
20-
<esri-legend></esri-legend>
20+
<h4>Layer Visibility</h4>
21+
<esri-layer></esri-layer>
22+
<h4>Legend</h4>
23+
<esri-legend class="legend-container"></esri-legend>
2124
<h4>Basemap</h4>
2225
<div>
2326
<basemap-select (basemapSelected)="onBasemapSelected($event)"></basemap-select>
2427
</div>
2528
</div>
26-
<div>
27-
<h3>LayerVisibility</h3>
28-
<esri-layer></esri-layer>
29-
</div>
3029
</div>
3130
`
3231
})
@@ -43,8 +42,6 @@ export class AppComponent {
4342

4443
// map config
4544
itemId = '8e42e164d4174da09f61fe0d3f206641';
46-
47-
4845
public mapOptions = {
4946
basemap: 'gray',
5047
center: [-97, 38], // lon, lat

app/styles/main.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,9 @@ esri-map esri-search .arcgisSearch {
1818
top: 15px;
1919
left: 65px;
2020
}
21+
22+
.legend-container {
23+
display: block;
24+
max-height: 360px;
25+
overflow-y: auto;
26+
}

0 commit comments

Comments
 (0)