Skip to content

Commit

Permalink
Make the key index number viewable (#628)
Browse files Browse the repository at this point in the history
  • Loading branch information
mpchadwick authored Mar 29, 2024
1 parent 7cb1e15 commit f7cd28b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/components/VirtualKeyboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ const isMousePressed = ref(false)
'hidden-sm': key.x > 8,
held: (heldNotes.get(key.index) || 0) > 0
}"
:index="key.index"
:color="key.color"
:isMousePressed="isMousePressed"
:noteOn="() => noteOn(key.index)"
Expand Down
2 changes: 2 additions & 0 deletions src/components/VirtualKeyboardKey.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ type NoteOff = () => void
type NoteOnCallback = () => NoteOff
const props = defineProps<{
index: number
color: string
isMousePressed: boolean
noteOn: NoteOnCallback
Expand Down Expand Up @@ -97,6 +98,7 @@ onUnmounted(() => {

<template>
<td
:data-key-number="index"
:style="'background-color:' + color"
:class="{ active }"
@touchstart="onTouchStart"
Expand Down

0 comments on commit f7cd28b

Please sign in to comment.