Increase size of color wheel cursor on mobile (#16723)

This commit is contained in:
Paul Bottein 2023-06-01 16:36:32 +02:00 committed by GitHub
parent e7f5d927b1
commit 47ac7062dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 4 deletions

View File

@ -317,9 +317,13 @@ class HaHsColorPicker extends LitElement {
const cy = ((y + 1) * size) / 2;
const markerPosition = `${cx}px, ${cy}px`;
const markerScale = this._pressed ? "1.5" : "1";
const markerScale = this._pressed
? this._pressed === "touch"
? "2.5"
: "1.5"
: "1";
const markerOffset =
this._pressed === "touch" ? `0px, -${size / 8}px` : "0px, 0px";
this._pressed === "touch" ? `0px, -${size / 16}px` : "0px, 0px";
return html`
<div class="container ${classMap({ pressed: Boolean(this._pressed) })}">

View File

@ -305,9 +305,13 @@ class HaTempColorPicker extends LitElement {
const cy = ((y + 1) * size) / 2;
const markerPosition = `${cx}px, ${cy}px`;
const markerScale = this._pressed ? "1.5" : "1";
const markerScale = this._pressed
? this._pressed === "touch"
? "2.5"
: "1.5"
: "1";
const markerOffset =
this._pressed === "touch" ? `0px, -${size / 8}px` : "0px, 0px";
this._pressed === "touch" ? `0px, -${size / 16}px` : "0px, 0px";
return html`
<div class="container ${classMap({ pressed: Boolean(this._pressed) })}">