diff --git a/web-app/src/app/authentication/authorize.component.ts b/web-app/src/app/authentication/authorize.component.ts index 605e73cfd..372d94da2 100644 --- a/web-app/src/app/authentication/authorize.component.ts +++ b/web-app/src/app/authentication/authorize.component.ts @@ -25,8 +25,6 @@ export class AuthorizeComponent { this.deviceId.setErrors(null) this.userService.authorize(this.token, this.deviceId.value).subscribe({ next: (response) => { - // TODO set token event" - // $rootScope.$broadcast('event:user', {user: service.myself, token: LocalStorageService.getToken(), isAdmin: service.amAdmin}); this.localStorageService.setToken(response.token) this.router.navigate(['map']); }, diff --git a/web-app/src/app/mage/mage.component.html b/web-app/src/app/mage/mage.component.html index 4ef7a7613..a998134a3 100644 --- a/web-app/src/app/mage/mage.component.html +++ b/web-app/src/app/mage/mage.component.html @@ -1,7 +1,7 @@ - + @@ -9,7 +9,7 @@ - + diff --git a/web-app/src/app/mage/mage.component.ts b/web-app/src/app/mage/mage.component.ts index 5ceddbccc..a1064a680 100644 --- a/web-app/src/app/mage/mage.component.ts +++ b/web-app/src/app/mage/mage.component.ts @@ -42,6 +42,7 @@ export class MageComponent implements OnInit, OnChanges { } onAddObservation($event) { + console.log('trying to add a mage component') if (this.hideFeed) { this.showFeed(); } diff --git a/web-app/src/app/map/map.component.html b/web-app/src/app/map/map.component.html index ed492c0b7..5a994ab82 100644 --- a/web-app/src/app/map/map.component.html +++ b/web-app/src/app/map/map.component.html @@ -20,10 +20,10 @@
- + + + +
diff --git a/web-app/src/app/map/map.component.scss b/web-app/src/app/map/map.component.scss index b83c74b83..12c48ca92 100644 --- a/web-app/src/app/map/map.component.scss +++ b/web-app/src/app/map/map.component.scss @@ -10,6 +10,15 @@ right: 0; } +.map-controls-left { + position: absolute; + z-index: 1000; + display: inline-flex; + flex-direction: column; + margin-top: 16px; + margin-left: 16px; +} + .map-controls-right { position: absolute; right: 0; diff --git a/web-app/src/app/map/map.component.ts b/web-app/src/app/map/map.component.ts index 699f1b484..43e279762 100644 --- a/web-app/src/app/map/map.component.ts +++ b/web-app/src/app/map/map.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { AfterViewInit, Component, EventEmitter, Output } from '@angular/core'; import { LocationState } from '../../app/map/controls/location.component'; import { ZoomDirection } from '../../app/map/controls/zoom.component'; import { LayerService } from '../layer/layer.service'; @@ -24,7 +24,7 @@ require('leaflet.markercluster'); styleUrls: ['./map.component.scss'], providers: [LayerService] }) -export class MapComponent implements OnInit { +export class MapComponent implements AfterViewInit { public static readonly PANE_Z_INDEX_BUCKET_SIZE = 10000; public static readonly BASE_PANE_Z_INDEX_OFFSET = 1 * MapComponent.PANE_Z_INDEX_BUCKET_SIZE; @@ -33,6 +33,8 @@ export class MapComponent implements OnInit { public static readonly FEATURE_PANE_Z_INDEX_OFFSET = 6 * MapComponent.PANE_Z_INDEX_BUCKET_SIZE; public static readonly MAGE_PANE_Z_INDEX_OFFSET = 7 * MapComponent.PANE_Z_INDEX_BUCKET_SIZE; + @Output() addObservation = new EventEmitter(); + map: any groups: any = {} layers: any = {} @@ -85,7 +87,7 @@ export class MapComponent implements OnInit { } } - ngOnInit() { + ngAfterViewInit() { let mapPosition = this.localStorageService.getMapPosition(); if (!mapPosition) { this.localStorageService.setMapPosition({ @@ -268,6 +270,13 @@ export class MapComponent implements OnInit { onPoll() { this.adjustTemporalLayers(); } + + onAddObservation() { + console.log('map add observation') + this.addObservation.emit({ + latLng: this.map.getCenter() + }) + } onLocate($event) { this.locate = $event.state; diff --git a/web-app/src/app/observation/observation-edit/observation-edit-form-picker.component.html b/web-app/src/app/observation/observation-edit/observation-edit-form-picker.component.html index ff0e43506..63ed1032a 100644 --- a/web-app/src/app/observation/observation-edit/observation-edit-form-picker.component.html +++ b/web-app/src/app/observation/observation-edit/observation-edit-form-picker.component.html @@ -1,17 +1,20 @@ -
-
Add a Form To Your Observation
-
+
+
+
Add a Form To Your Observation
+
- + - - - description -
{{form.name}}
-
{{form.description}}
-
-
+ + + description +
{{form.name}}
+
{{form.description}}
+
+
-
- +
+ +
+ diff --git a/web-app/src/app/observation/observation-edit/observation-edit-form-picker.component.scss b/web-app/src/app/observation/observation-edit/observation-edit-form-picker.component.scss index 66b27c56b..44cdea16b 100644 --- a/web-app/src/app/observation/observation-edit/observation-edit-form-picker.component.scss +++ b/web-app/src/app/observation/observation-edit/observation-edit-form-picker.component.scss @@ -1,3 +1,7 @@ +.container { + width: 468px; +} + .form-picker-header { display: flex; align-items: center; diff --git a/web-app/src/styles.scss b/web-app/src/styles.scss index d493cdc9c..80aefd9f1 100644 --- a/web-app/src/styles.scss +++ b/web-app/src/styles.scss @@ -13,12 +13,11 @@ app { height: 100% } -mat-bottom-sheet-container.feed-panel { - position: absolute; +.feed-panel .mat-bottom-sheet-container { + position: absolute !important; left: 0; - bottom:0; - width: 450px; - min-width: 450px; + bottom: 0; + min-width: 468px; } .form-remove-snackbar {