Lightbox escape keyboard shortcut also works
This commit is contained in:
parent
5d9dc638ea
commit
72300d1b0c
3 changed files with 7 additions and 2 deletions
|
@ -28,12 +28,14 @@ import type {Clock} from "../platform/web/dom/Clock";
|
||||||
import type {ILogger} from "../logging/types";
|
import type {ILogger} from "../logging/types";
|
||||||
import type {Navigation} from "./navigation/Navigation";
|
import type {Navigation} from "./navigation/Navigation";
|
||||||
import type {URLRouter} from "./navigation/URLRouter";
|
import type {URLRouter} from "./navigation/URLRouter";
|
||||||
|
import type {History} from "../platform/web/dom/History";
|
||||||
|
|
||||||
export type Options = {
|
export type Options = {
|
||||||
platform: Platform
|
platform: Platform
|
||||||
logger: ILogger
|
logger: ILogger
|
||||||
urlCreator: URLRouter
|
urlCreator: URLRouter
|
||||||
navigation: Navigation
|
navigation: Navigation
|
||||||
|
history: History
|
||||||
emitChange?: (params: any) => void
|
emitChange?: (params: any) => void
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -142,4 +144,8 @@ export class ViewModel<O extends Options = Options> extends EventEmitter<{change
|
||||||
get navigation(): Navigation {
|
get navigation(): Navigation {
|
||||||
return this._options.navigation;
|
return this._options.navigation;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get history(): History {
|
||||||
|
return this._options.history;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -96,6 +96,6 @@ export class LightboxViewModel extends ViewModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
close() {
|
close() {
|
||||||
this.platform.history.pushUrl(this.closeUrl);
|
this.history.pushUrl(this.closeUrl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,6 @@ import {ViewModel} from "../../../ViewModel";
|
||||||
|
|
||||||
export class TimelineViewModel extends ViewModel {
|
export class TimelineViewModel extends ViewModel {
|
||||||
constructor(options) {
|
constructor(options) {
|
||||||
console.log('TimelineViewModel asdf', options)
|
|
||||||
super(options);
|
super(options);
|
||||||
const {timeline, tileOptions} = options;
|
const {timeline, tileOptions} = options;
|
||||||
this._timeline = this.track(timeline);
|
this._timeline = this.track(timeline);
|
||||||
|
|
Reference in a new issue