Skip to content

Commit

Permalink
fix touch and mouse
Browse files Browse the repository at this point in the history
  • Loading branch information
NoodleSushi committed Aug 27, 2023
1 parent 1a0e6d3 commit 6e0d787
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -139,16 +139,16 @@
</div>
<div class="layer touch full-height">
<div class="touchpad"
on:mousedown={() => bongoInteract(0, true)}
on:mouseup={() => bongoInteract(0, false)}
on:touchstart={() => bongoInteract(0, true)}
on:touchend={() => bongoInteract(0, false)}
on:mousedown={(e) => {if (e.button == 0) bongoInteract(0, true)}}
on:mouseup={(e) => {if (e.button == 0) bongoInteract(0, false)}}
on:touchstart|preventDefault ={() => bongoInteract(0, true)}
on:touchend|preventDefault ={() => bongoInteract(0, false)}
/>
<div class="touchpad"
on:mousedown={() => bongoInteract(1, true)}
on:mouseup={() => bongoInteract(1, false)}
on:touchstart={() => bongoInteract(1, true)}
on:touchend={() => bongoInteract(1, false)}
on:mousedown={(e) => {if (e.button == 0) bongoInteract(1, true)}}
on:mouseup={(e) => {if (e.button == 0) bongoInteract(1, false)}}
on:touchstart|preventDefault ={() => bongoInteract(1, true)}
on:touchend|preventDefault ={() => bongoInteract(1, false)}
/>
</div>
<div class="layer" style:opacity={$insOpacity}>
Expand Down

0 comments on commit 6e0d787

Please sign in to comment.