mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-03-12 01:32:12 +00:00
feat: apply new layout overhaul
This commit is contained in:
committed by
Rainer Killinger
parent
f16e5394cc
commit
7bbdba5c0b
@@ -13,6 +13,7 @@
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Component, ElementRef, Input, OnInit, ViewChild} from '@angular/core';
|
||||
import {Router} from '@angular/router';
|
||||
import {SCPlace} from '@openstapps/core';
|
||||
import {geoJSON, Map, MapOptions, tileLayer} from 'leaflet';
|
||||
import {MapProvider} from '../map.provider';
|
||||
@@ -46,6 +47,13 @@ export class MapWidgetComponent implements OnInit {
|
||||
*/
|
||||
@Input() place: SCPlace;
|
||||
|
||||
/**
|
||||
* Indicates if the expand button should be visible
|
||||
*/
|
||||
showExpandButton = true;
|
||||
|
||||
constructor(private router: Router) {}
|
||||
|
||||
/**
|
||||
* Prepare the map
|
||||
*/
|
||||
@@ -69,6 +77,9 @@ export class MapWidgetComponent implements OnInit {
|
||||
zoom: 16,
|
||||
zoomControl: false,
|
||||
};
|
||||
if (this.router) {
|
||||
this.showExpandButton = !this.router.url.startsWith('/map');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
#mapContainer
|
||||
[leafletOptions]="options"
|
||||
></div>
|
||||
<div class="map-buttons">
|
||||
<div class="map-buttons" *ngIf="showExpandButton">
|
||||
<ion-button
|
||||
color="primary"
|
||||
shape="round"
|
||||
size="small"
|
||||
[routerLink]="['/map', place.uid]"
|
||||
>
|
||||
<ion-icon name="expand"></ion-icon>
|
||||
<ion-icon name="arrows-maximize"></ion-icon>
|
||||
</ion-button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user