Skip to content

Commit ddddbc4

Browse files
WIP: Tweak map styles
1 parent 404dbd4 commit ddddbc4

11 files changed

Lines changed: 57 additions & 38 deletions

File tree

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import { PLAY } from './icons/play';
2828
import { SAVE } from './icons/save';
2929
import { MaterialModule } from './material.module';
3030
import { VSCodeRendererMessenger } from './services/vscode-renderer-messenger.service';
31+
import { MY_LOCATION_FILLED } from './icons/my-location-fill';
3132

3233
@NgModule({
3334
declarations: [AppComponent],
@@ -92,6 +93,7 @@ export class AppModule implements DoBootstrap {
9293
const icons: { [key: string]: any } = {
9394
'fast-forward': FAST_FORWARD,
9495
'fast-rewind': FAST_REWIND,
96+
my_location_fill: MY_LOCATION_FILLED,
9597
pause: PAUSE,
9698
play: PLAY,
9799
save: SAVE,

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ import { DataSharingService } from '../data-sharing.service';
1717
*/
1818
export const IDL_NB_ENTRY_COMPONENT_SELECTOR = 'idl-nb-entry';
1919

20+
const DEFAULT_CLASS = 'vscode-outlined';
21+
22+
const OUTLINED_CLASS = 'vscode-outlined-focus';
23+
2024
/**
2125
* Entry components handles the logic of determining the right thing
2226
* to render and creates the correct type of element to display
@@ -68,19 +72,19 @@ export class EntryComponent implements AfterViewInit {
6872
*/
6973
embed!: IDLNotebookEmbeddedItem<IDLNotebook_EmbedType>;
7074

71-
class = '';
75+
class = DEFAULT_CLASS;
7276

7377
constructor(
7478
@Host() private dataShare: DataSharingService,
7579
private el: ElementRef<HTMLElement>
7680
) {}
7781

7882
ngAfterViewInit() {
79-
this.el.nativeElement.onclick = () => {
80-
this.class = 'vscode-outlined';
83+
this.el.nativeElement.onmousedown = () => {
84+
this.class = OUTLINED_CLASS;
8185
};
8286
this.el.nativeElement.onmouseleave = () => {
83-
this.class = '';
87+
this.class = DEFAULT_CLASS;
8488
};
8589
}
8690
}

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

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
<!-- chart gets added directly in the component so we can have unique ID for canvas element -->
22

3-
<div
4-
class="map-container vscode-outlined cell-item-full-height"
5-
style="position: relative"
6-
>
3+
<div class="map-container cell-item-full-height" style="position: relative">
74
<canvas #MapCanvas></canvas>
85

9-
<!-- <div class="controls">
10-
<button mat-mini-fab (click)="resetView()">
11-
<mat-icon>fullscreen</mat-icon>
12-
</button>
13-
</div> -->
6+
<div class="map-controls" fxLayout="row" fxLayoutAlign="space-around center">
7+
<mat-icon
8+
(click)="resetView()"
9+
class="icon-button"
10+
svgIcon="my_location_fill"
11+
></mat-icon>
12+
</div>
1413

15-
<div class="credits">
14+
<div class="map-credits">
1615
<div style="padding-left: 5px; padding-right: 5px">
1716
Base map: Powered by <a href="https://www.esri.com/en-us/home">Esri</a>
1817
</div>

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

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,13 @@ export const IDL_NB_MAP_COMPONENT_SELECTOR = 'idl-nb-map';
4747
width: 100%;
4848
}
4949
50-
.credits {
50+
.map-credits {
5151
position: absolute;
5252
right: 0;
5353
bottom: 0;
5454
color: black !important;
5555
background: rgba(150, 150, 150, 125);
5656
}
57-
58-
.controls {
59-
position: absolute;
60-
left: 0;
61-
bottom: 0;
62-
}
6357
`,
6458
],
6559
})
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const FAST_FORWARD = `<svg xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 -960 960 960" width="48"><path d="M104-240v-480l346 240-346 240Zm407 0v-480l346 240-346 240Z"/></svg>`;
1+
export const FAST_FORWARD = `<svg xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 -960 960 960" width="48" fill="currentColor"><path d="M104-240v-480l346 240-346 240Zm407 0v-480l346 240-346 240Z"/></svg>`;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const FAST_REWIND = `<svg xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 -960 960 960" width="48"><path d="M854-240 508-480l346-240v480Zm-402 0L106-480l346-240v480Z"/></svg>`;
1+
export const FAST_REWIND = `<svg xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 -960 960 960" width="48" fill="currentColor"><path d="M854-240 508-480l346-240v480Zm-402 0L106-480l346-240v480Z"/></svg>`;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const MY_LOCATION_FILLED = `<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="currentColor"><path d="M440-42v-80q-125-14-214.5-103.5T122-440H42v-80h80q14-125 103.5-214.5T440-838v-80h80v80q125 14 214.5 103.5T838-520h80v80h-80q-14 125-103.5 214.5T520-122v80h-80Zm40-158q116 0 198-82t82-198q0-116-82-198t-198-82q-116 0-198 82t-82 198q0 116 82 198t198 82Zm0-120q-66 0-113-47t-47-113q0-66 47-113t113-47q66 0 113 47t47 113q0 66-47 113t-113 47Z"/></svg>`;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const PAUSE = `<svg xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 -960 960 960" width="48"><path d="M555-200v-560h175v560H555Zm-325 0v-560h175v560H230Z"/></svg>`;
1+
export const PAUSE = `<svg xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 -960 960 960" width="48" fill="currentColor"><path d="M555-200v-560h175v560H555Zm-325 0v-560h175v560H230Z"/></svg>`;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const PLAY = `<svg xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 -960 960 960" width="48"><path d="M320-203v-560l440 280-440 280Z"/></svg>`;
1+
export const PLAY = `<svg xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 -960 960 960" width="48" fill="currentColor"><path d="M320-203v-560l440 280-440 280Z"/></svg>`;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const SAVE = `<svg xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 -960 960 960" width="48"><path d="M840-683v503q0 24-18 42t-42 18H180q-24 0-42-18t-18-42v-600q0-24 18-42t42-18h503l157 157ZM479.765-245Q523-245 553.5-275.265q30.5-30.264 30.5-73.5Q584-392 553.735-422.5q-30.264-30.5-73.5-30.5Q437-453 406.5-422.735q-30.5 30.264-30.5 73.5Q376-306 406.265-275.5q30.264 30.5 73.5 30.5ZM233-584h358v-143H233v143Z"/></svg>`;
1+
export const SAVE = `<svg xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 -960 960 960" width="48" fill="currentColor"><path d="M840-683v503q0 24-18 42t-42 18H180q-24 0-42-18t-18-42v-600q0-24 18-42t42-18h503l157 157ZM479.765-245Q523-245 553.5-275.265q30.5-30.264 30.5-73.5Q584-392 553.735-422.5q-30.264-30.5-73.5-30.5Q437-453 406.5-422.735q-30.5 30.264-30.5 73.5Q376-306 406.265-275.5q30.264 30.5 73.5 30.5ZM233-584h358v-143H233v143Z"/></svg>`;

0 commit comments

Comments
 (0)