Skip to content

Commit dcf2cf2

Browse files
Add/comment code for more map menu
1 parent 7143963 commit dcf2cf2

5 files changed

Lines changed: 32 additions & 11 deletions

File tree

apps/notebook/components/src/app/app.module.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { ApplicationRef, DoBootstrap, Injector, NgModule } from '@angular/core';
66
import { createCustomElement } from '@angular/elements';
77
import { MatIconRegistry } from '@angular/material/icon';
88
import { BrowserModule, DomSanitizer } from '@angular/platform-browser';
9+
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
910
import {
1011
MaterialCssVarsModule,
1112
MaterialCssVarsService,
@@ -23,19 +24,21 @@ import {
2324
} from './components/map/map-property-sheet/map-property-sheet.component';
2425
import { FAST_FORWARD } from './icons/fast-forward';
2526
import { FAST_REWIND } from './icons/fast-rewind';
27+
import { LAYERS } from './icons/layers';
28+
import { MY_LOCATION_FILLED } from './icons/my-location-fill';
2629
import { PAUSE } from './icons/pause';
2730
import { PLAY } from './icons/play';
2831
import { SAVE } from './icons/save';
2932
import { MaterialModule } from './material.module';
3033
import { VSCodeRendererMessenger } from './services/vscode-renderer-messenger.service';
31-
import { MY_LOCATION_FILLED } from './icons/my-location-fill';
3234

3335
@NgModule({
3436
declarations: [AppComponent],
3537
bootstrap: [],
3638
exports: [],
3739
imports: [
3840
BrowserModule,
41+
BrowserAnimationsModule,
3942
MaterialCssVarsModule.forRoot({}),
4043
MaterialModule,
4144
ComponentsModule,
@@ -93,6 +96,7 @@ export class AppModule implements DoBootstrap {
9396
const icons: { [key: string]: any } = {
9497
'fast-forward': FAST_FORWARD,
9598
'fast-rewind': FAST_REWIND,
99+
layers: LAYERS,
96100
my_location_fill: MY_LOCATION_FILLED,
97101
pause: PAUSE,
98102
play: PLAY,

apps/notebook/components/src/app/components/map/map.component.html

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,27 @@
33
<div class="map-container cell-item-full-height" style="position: relative">
44
<canvas #MapCanvas></canvas>
55

6-
<div
7-
class="map-controls toolbar"
8-
fxLayout="row"
9-
fxLayoutAlign="space-around center"
10-
>
11-
<mat-icon
12-
(click)="resetView()"
13-
class="icon-button"
14-
svgIcon="my_location_fill"
15-
></mat-icon>
6+
<div class="map-controls" fxLayout="column" fxLayoutAlign="center start">
7+
<!-- <div
8+
*ngIf="showLayers"
9+
fxLayout="column"
10+
class="toolbar"
11+
style="margin-bottom: 5px"
12+
>
13+
Something cool
14+
</div> -->
15+
<div fxLayout="row" fxLayoutAlign="space-around center" class="toolbar">
16+
<mat-icon
17+
(click)="resetView()"
18+
class="icon-button"
19+
svgIcon="my_location_fill"
20+
></mat-icon>
21+
<!-- <mat-icon
22+
(click)="showLayers = !showLayers"
23+
class="icon-button"
24+
svgIcon="layers"
25+
></mat-icon> -->
26+
</div>
1627
</div>
1728

1829
<div class="map-credits">

apps/notebook/components/src/app/components/map/map.component.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ export class MapComponent
7676
/** Current layers */
7777
private layers!: ILayers;
7878

79+
/** Do we show the layers dialog */
80+
showLayers = false;
81+
7982
/**
8083
* Interval callback to make sure we render
8184
*
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const LAYERS = `<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="currentColor"><path d="M480-118 120-398l66-50 294 228 294-228 66 50-360 280Zm0-202L120-600l360-280 360 280-360 280Z"/></svg>`;

apps/notebook/components/src/app/material.module.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
import { NgModule } from '@angular/core';
22
import { MatButtonModule } from '@angular/material/button';
33
import { MatIconModule } from '@angular/material/icon';
4+
import { MatMenuModule } from '@angular/material/menu';
45
import { MatSliderModule } from '@angular/material/slider';
56
import { MatTableModule } from '@angular/material/table';
67
import { FlexLayoutModule } from '@ngbracket/ngx-layout';
78

89
const modules = [
910
MatIconModule,
1011
MatButtonModule,
12+
MatMenuModule,
1113
MatSliderModule,
1214
MatTableModule,
1315
FlexLayoutModule,

0 commit comments

Comments
 (0)