Skip to content

Commit

Permalink
check internal target touches list length instead of event list as ev…
Browse files Browse the repository at this point in the history
…ent target touches seems to be inconsistent
  • Loading branch information
Nerwyn committed Dec 9, 2024
1 parent 9bd6551 commit 4a22bba
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions dist/universal-remote-card.min.js

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion src/classes/remote-touchpad.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,13 @@ export class RemoteTouchpad extends BaseRemoteElement {
if (e.cancelable) {
e.preventDefault();
}
let holdMove = this.holdMove;
if ((this.targetTouches?.length ?? 0) > 1) {
holdMove = true;
}
this.endAction();
console.log('Ending action after hold/move');
if ('targetTouches' in e && e.targetTouches?.length) {
if (holdMove) {
this.holdMove = true;
console.log('Finger still down, setting holdMove to true');
}
Expand Down

0 comments on commit 4a22bba

Please sign in to comment.