Skip to content
Snippets Groups Projects
Commit c3140344 authored by SeeLook's avatar SeeLook :musical_note:
Browse files

Piano: fixed JS

parent 6499961e
No related branches found
No related tags found
No related merge requests found
...@@ -21,7 +21,9 @@ TpianoBg { ...@@ -21,7 +21,9 @@ TpianoBg {
width: Math.max(nootkaWindow.width, GLOB.instrument.getItemHeight(nootkaWindow.shortEdge) * 6.7) width: Math.max(nootkaWindow.width, GLOB.instrument.getItemHeight(nootkaWindow.shortEdge) * 6.7)
height: GLOB.instrument.getItemHeight(nootkaWindow.shortEdge) height: GLOB.instrument.getItemHeight(nootkaWindow.shortEdge)
onWantKeyToSelect: selectKey(k > -1 ? (isWhite ? whiteRep.itemAt(k) : whiteRep.itemAt(k).black) : null) onWantKeyToSelect: (k, isWhite) => {
selectKey(k > -1 ? (isWhite ? whiteRep.itemAt(k) : whiteRep.itemAt(k).black) : null);
}
transformOrigin: Item.TopLeft transformOrigin: Item.TopLeft
onCorrectInstrument: { onCorrectInstrument: {
if (!correctAnim) if (!correctAnim)
...@@ -87,8 +89,8 @@ TpianoBg { ...@@ -87,8 +89,8 @@ TpianoBg {
PianoKeyWhite { PianoKeyWhite {
nr: index nr: index
onEntered: activeKey = key onEntered: key => { activeKey = key; }
onClicked: selectedKey = key onClicked: key => { selectedKey = key; }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment