Add initial zoom support.

This commit is contained in:
Dermot Duffy
2023-04-22 16:32:11 -07:00
parent e67d7d61f3
commit 705afaca99
20 changed files with 582 additions and 138 deletions
+37
View File
@@ -0,0 +1,37 @@
import { css, CSSResultGroup, html, LitElement, TemplateResult } from 'lit';
import { customElement } from 'lit/decorators.js';
import { Zoom } from '../utils/zoom/zoom.js';
@customElement('frigate-card-zoomer')
export class FrigateCardZoomer extends LitElement {
protected _zoom = new Zoom(this);
connectedCallback(): void {
super.connectedCallback();
this._zoom.activate();
}
disconnectedCallback(): void {
this._zoom.deactivate();
}
protected render(): TemplateResult | void {
return html` <slot></slot> `;
}
static get styles(): CSSResultGroup {
return css`
:host {
width: 100%;
height: 100%;
display: block;
}
`;
}
}
declare global {
interface HTMLElementTagNameMap {
'frigate-card-zoomer': FrigateCardZoomer;
}
}