mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-22 01:22:54 +00:00
committed by
Rainer Killinger
parent
1c56c891e1
commit
837c69bb21
@@ -438,7 +438,7 @@ export class MapPageComponent {
|
|||||||
this.distance = this.positionService.getDistance(this.items[0].geo.point);
|
this.distance = this.positionService.getDistance(this.items[0].geo.point);
|
||||||
this.addToMap(this.items, true);
|
this.addToMap(this.items, true);
|
||||||
this.ref.detectChanges();
|
this.ref.detectChanges();
|
||||||
const url = this.router.createUrlTree(['/map/', uid]).toString();
|
const url = this.router.createUrlTree([[], uid]).toString();
|
||||||
this.location.go(url);
|
this.location.go(url);
|
||||||
// center the selected place
|
// center the selected place
|
||||||
this.focus(geoJSON(this.items[0].geo.point).getBounds().getCenter());
|
this.focus(geoJSON(this.items[0].geo.point).getBounds().getCenter());
|
||||||
|
|||||||
@@ -19,9 +19,9 @@ import {
|
|||||||
OnInit,
|
OnInit,
|
||||||
ViewChild,
|
ViewChild,
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
import {ActivatedRoute} from '@angular/router';
|
import {Location} from '@angular/common';
|
||||||
|
import {ActivatedRoute, Router} from '@angular/router';
|
||||||
import {AnimationController, ModalController} from '@ionic/angular';
|
import {AnimationController, ModalController} from '@ionic/angular';
|
||||||
import {last} from 'lodash-es';
|
|
||||||
import {SharedAxisChoreographer} from '../../../animation/animation-choreographer';
|
import {SharedAxisChoreographer} from '../../../animation/animation-choreographer';
|
||||||
import {materialSharedAxisX} from '../../../animation/material-motion';
|
import {materialSharedAxisX} from '../../../animation/material-motion';
|
||||||
import {ModalEventCreatorComponent} from './modal/modal-event-creator.component';
|
import {ModalEventCreatorComponent} from './modal/modal-event-creator.component';
|
||||||
@@ -136,6 +136,8 @@ export class SchedulePageComponent implements OnInit, AfterViewInit {
|
|||||||
private readonly modalController: ModalController,
|
private readonly modalController: ModalController,
|
||||||
private readonly activatedRoute: ActivatedRoute,
|
private readonly activatedRoute: ActivatedRoute,
|
||||||
private readonly animationController: AnimationController,
|
private readonly animationController: AnimationController,
|
||||||
|
private router: Router,
|
||||||
|
private location: Location,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
@@ -172,13 +174,10 @@ export class SchedulePageComponent implements OnInit, AfterViewInit {
|
|||||||
* When the segment changes
|
* When the segment changes
|
||||||
*/
|
*/
|
||||||
onSegmentChange() {
|
onSegmentChange() {
|
||||||
window.history.replaceState(
|
const url = this.router
|
||||||
{},
|
.createUrlTree([[], this.segmentView.value])
|
||||||
'',
|
.toString();
|
||||||
`/#/schedule/${this.segmentView.value}/${last(
|
this.location.go(url);
|
||||||
window.location.href.split('/'),
|
|
||||||
)}`,
|
|
||||||
);
|
|
||||||
this.tabChoreographer.changeViewForState(this.segmentView.value);
|
this.tabChoreographer.changeViewForState(this.segmentView.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user