|
|
|
@ -15,8 +15,9 @@ import { ResizedEvent } from 'angular-resize-event';
|
|
|
|
|
import { from } from 'rxjs';
|
|
|
|
|
import { open } from '@tauri-apps/api/dialog';
|
|
|
|
|
import { OverlayRef } from '@angular/cdk/overlay';
|
|
|
|
|
import { OverlayService } from '../services/overlay.service';
|
|
|
|
|
import { OverlayService, StateEvent } from '../services/overlay.service';
|
|
|
|
|
import { appWindow } from '@tauri-apps/api/window';
|
|
|
|
|
import { EventsService } from '../services/events.service';
|
|
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
|
selector: 'plan-display',
|
|
|
|
@ -36,13 +37,22 @@ export class PlanDisplayComponent implements AfterViewInit, OnInit {
|
|
|
|
|
worldAreaMap?: Map<String, WorldArea>;
|
|
|
|
|
settingsOpen: boolean = false;
|
|
|
|
|
init: boolean = false;
|
|
|
|
|
hasAttachedOnce: boolean = false;
|
|
|
|
|
|
|
|
|
|
constructor(private configService: ConfigService, private cdr: ChangeDetectorRef, private shortcut: ShortcutService, public planService: PlanService, public worldAreaService: WorldAreaService, public overlayService: OverlayService) {
|
|
|
|
|
constructor(private events: EventsService, private configService: ConfigService, private cdr: ChangeDetectorRef, private shortcut: ShortcutService, public planService: PlanService, public worldAreaService: WorldAreaService, public overlayService: OverlayService) {
|
|
|
|
|
// for (let i = 0; i < 100; i++) {
|
|
|
|
|
// this.slides.push(i);
|
|
|
|
|
// }
|
|
|
|
|
window.addEventListener("resize", this.windowInitHandler.bind(this));
|
|
|
|
|
overlayService.setInteractable();
|
|
|
|
|
// this.slides.push(i);
|
|
|
|
|
// }
|
|
|
|
|
window.addEventListener("resize", this.windowInitHandler.bind(this));
|
|
|
|
|
const test = this.events.listen<StateEvent>("OverlayStateChange").subscribe(event => {
|
|
|
|
|
if (!this.hasAttachedOnce) {
|
|
|
|
|
this.hasAttachedOnce = true;
|
|
|
|
|
test.unsubscribe();
|
|
|
|
|
if(!event.payload.Hidden)
|
|
|
|
|
overlayService.setInteractable();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
appWindow.listen("entered", (entered) => {
|
|
|
|
|
console.log("entered", entered);
|
|
|
|
|