mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-27 11:16:35 +00:00
Only show more info on graphs when mouse is used (#19606)
only show more info on graphs when mouse is used
This commit is contained in:
parent
28a0d216f9
commit
fb73bfb964
@ -438,7 +438,10 @@ export class HaChartBase extends LitElement {
|
|||||||
color: white;
|
color: white;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
z-index: 1000;
|
z-index: 1;
|
||||||
|
-ms-user-select: none;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
width: 200px;
|
width: 200px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
direction: var(--direction);
|
direction: var(--direction);
|
||||||
|
@ -220,7 +220,12 @@ export class StateHistoryChartLine extends LitElement {
|
|||||||
// @ts-expect-error
|
// @ts-expect-error
|
||||||
locale: numberFormatToLocale(this.hass.locale),
|
locale: numberFormatToLocale(this.hass.locale),
|
||||||
onClick: (e: any) => {
|
onClick: (e: any) => {
|
||||||
if (!this.clickForMoreInfo) {
|
if (
|
||||||
|
!this.clickForMoreInfo ||
|
||||||
|
!(e.native instanceof MouseEvent) ||
|
||||||
|
(e.native instanceof PointerEvent &&
|
||||||
|
e.native.pointerType !== "mouse")
|
||||||
|
) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -224,7 +224,11 @@ export class StateHistoryChartTimeline extends LitElement {
|
|||||||
// @ts-expect-error
|
// @ts-expect-error
|
||||||
locale: numberFormatToLocale(this.hass.locale),
|
locale: numberFormatToLocale(this.hass.locale),
|
||||||
onClick: (e: any) => {
|
onClick: (e: any) => {
|
||||||
if (!this.clickForMoreInfo) {
|
if (
|
||||||
|
!this.clickForMoreInfo ||
|
||||||
|
!(e.native instanceof MouseEvent) ||
|
||||||
|
(e.native instanceof PointerEvent && e.native.pointerType !== "mouse")
|
||||||
|
) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user