mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 02:06:42 +00:00
fix double tap on glance entity (#4051)
This commit is contained in:
parent
880b382a16
commit
0005c75091
@ -183,7 +183,7 @@ export class HuiGlanceCard extends LitElement implements LovelaceCard {
|
||||
return html`
|
||||
<div
|
||||
class="entity"
|
||||
.entityConf="${entityConf}"
|
||||
.config="${entityConf}"
|
||||
@ha-click=${this._handleClick}
|
||||
@ha-hold=${this._handleHold}
|
||||
@ha-dblclick=${this._handleDblClick}
|
||||
@ -231,17 +231,17 @@ export class HuiGlanceCard extends LitElement implements LovelaceCard {
|
||||
}
|
||||
|
||||
private _handleClick(ev: MouseEvent): void {
|
||||
const config = (ev.currentTarget as any).entityConf as GlanceConfigEntity;
|
||||
const config = (ev.currentTarget as any).config as GlanceConfigEntity;
|
||||
handleClick(this, this.hass!, config, false, false);
|
||||
}
|
||||
|
||||
private _handleHold(ev: MouseEvent): void {
|
||||
const config = (ev.currentTarget as any).entityConf as GlanceConfigEntity;
|
||||
const config = (ev.currentTarget as any).config as GlanceConfigEntity;
|
||||
handleClick(this, this.hass!, config, true, false);
|
||||
}
|
||||
|
||||
private _handleDblClick(ev: MouseEvent): void {
|
||||
const config = (ev.currentTarget as any).entityConf as GlanceConfigEntity;
|
||||
const config = (ev.currentTarget as any).config as GlanceConfigEntity;
|
||||
handleClick(this, this.hass!, config, false, true);
|
||||
}
|
||||
}
|
||||
|
@ -241,7 +241,7 @@ class HuiPictureGlanceCard extends LitElement implements LovelaceCard {
|
||||
}
|
||||
|
||||
private _handleDblClick(ev: MouseEvent): void {
|
||||
const config = (ev.currentTarget as any).entityConf as any;
|
||||
const config = (ev.currentTarget as any).config as any;
|
||||
handleClick(this, this.hass!, config, false, true);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user