Skip to content

Commit

Permalink
Fixed touch for Windows & BrightSign devices
Browse files Browse the repository at this point in the history
  • Loading branch information
SebMeunier committed May 23, 2024
1 parent 39469ed commit 14a178e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ci360.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -623,9 +623,9 @@ class CI360Viewer {
}

onMoveHandler(event) {
const currentPositionX = this.isMobile ? event.touches[0].clientX : event.pageX;
const currentPositionY = this.isMobile ? event.touches[0].clientY : event.pageY;

const currentPositionX = event.touches && event.touches.length > 0 ? event.touches[0].clientX : event.pageX;
const currentPositionY = event.touches && event.touches.length > 0 ? event.touches[0].clientY : event.pageY;
const isMoveRight = currentPositionX - this.movementStart.x >= this.speedFactor;
const isMoveLeft = this.movementStart.x - currentPositionX >= this.speedFactor;
const isMoveTop = this.movementStart.y - currentPositionY >= this.speedFactor;
Expand Down

0 comments on commit 14a178e

Please sign in to comment.