Skip to content

Commit

Permalink
multi touch
Browse files Browse the repository at this point in the history
  • Loading branch information
eguneys committed Jan 3, 2024
1 parent 2e656e1 commit e3d40ad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="#" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" user-scalable="no" />
<title>lisotaire.com</title>
<style>
html, body {
Expand Down
3 changes: 3 additions & 0 deletions src/mouse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ export class Mouse {

const dragStart = (e: Event) => {
e.preventDefault()
if ((e as TouchEvent).touches?.length > 1) {
return
}
_onDragStart?.(ep(e as MouchEvent), (e as MouseEvent).buttons === 2 || (e as MouseEvent).button === 2) }
const dragMove = (e: Event) => { _onDragMove?.(ep(e as MouchEvent)) }
const dragEnd = (e: Event) => { _onDragEnd?.(ep(e as MouchEvent)) }
Expand Down

0 comments on commit e3d40ad

Please sign in to comment.