Use an automation to change view to default.

This commit is contained in:
Dermot Duffy
2024-06-11 19:48:39 -07:00
parent afb9af5eb4
commit 8c7c2c8c18
7 changed files with 101 additions and 97 deletions
+13 -5
View File
@@ -79,6 +79,10 @@ export class CardElementManager {
'mousemove',
this._api.getInteractionManager().reportInteraction,
);
this._element.addEventListener(
'wheel',
this._api.getInteractionManager().reportInteraction,
);
this._element.addEventListener(
'll-custom',
this._api.getActionsManager().handleCustomActionEvent,
@@ -129,11 +133,15 @@ export class CardElementManager {
// Uninitialize cameras to cause them to reinitialize on
// reconnection, to ensure the state subscription/unsubscription works
// correctly for triggers.
this._api.getInitializationManager().uninitialize(InitializationAspect.CAMERAS),
this._element.removeEventListener(
'mousemove',
this._api.getInteractionManager().reportInteraction,
);
this._api.getInitializationManager().uninitialize(InitializationAspect.CAMERAS);
this._element.removeEventListener(
'mousemove',
this._api.getInteractionManager().reportInteraction,
);
this._element.removeEventListener(
'wheel',
this._api.getInteractionManager().reportInteraction,
);
this._element.removeEventListener(
'll-custom',
this._api.getActionsManager().handleCustomActionEvent,