Add interaction and triggered conditions.

This commit is contained in:
Dermot Duffy
2024-01-25 22:06:21 -08:00
parent 06f2151bab
commit 5e72070c96
27 changed files with 379 additions and 90 deletions
+11 -3
View File
@@ -8,6 +8,10 @@ export class FullscreenManager {
this._api = api;
}
public initialize(): void {
this._setConditionState();
}
public connect(): void {
if (screenfull.isEnabled) {
screenfull.on('change', this._fullscreenHandler);
@@ -32,12 +36,16 @@ export class FullscreenManager {
screenfull.exit();
}
protected _fullscreenHandler = (): void => {
this._api.getExpandManager().setExpanded(false);
protected _setConditionState(): void {
this._api.getConditionsManager()?.setState({
fullscreen: this.isInFullscreen(),
});
}
protected _fullscreenHandler = (): void => {
this._api.getExpandManager().setExpanded(false);
this._setConditionState();
// Re-render after a change to fullscreen mode to take advantage of
// the expanded screen real-estate (vs staying in aspect-ratio locked