Allow view change events to trigger re-render.
This commit is contained in:
@@ -4,6 +4,7 @@ import { View } from './view';
|
||||
export interface ConditionState {
|
||||
view?: View;
|
||||
fullscreen?: boolean;
|
||||
camera?: string;
|
||||
}
|
||||
|
||||
class ConditionStateRequestEvent extends Event {
|
||||
@@ -21,6 +22,9 @@ export function evaluateCondition(
|
||||
if (condition?.fullscreen !== undefined && state?.fullscreen !== undefined) {
|
||||
result &&= condition?.fullscreen == state?.fullscreen;
|
||||
}
|
||||
if (condition?.camera?.length && state?.camera) {
|
||||
result &&= condition?.camera.includes(state?.camera);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user