beatMouseMove
Description​
This event is fired whenever the user moves the mouse over a beat after the user already pressed the button on a beat.
beatMouseMoveJavaScript |
alphaTab.beatMouseMovejQuery |
alphaTab.beatMouseMoveHTML |
BeatMouseMove.net |
beatMouseMoveAndroid |
Types​
function(beat, originalEvent)JavaScript |
Action<AlphaTab.Model.Beat>.net |
(beat: alphaTab.model.Beat) -> UnitAndroid |
Parameters​
Parameters | Type | Summary |
---|---|---|
beatJavaScript | alphaTab.model.Beat | Beat on which the mouse was hovered over during mouse down. |
originalEventJavaScript & jQuery | MouseEvent | The original mouse event that lead to trigger of the beat event. For the DOM event it is stored in the event.originalEvent. |
beat.net | AlphaTab.Model.Beat | Beat on which the mouse was hovered over during mouse down. |
beatAndroid | alphaTab.model.Beat | Beat on which the mouse was hovered over during mouse down. |
Examples​
- JavaScript
- HTML
- jQuery
- C#
- Android
const api = new alphaTab.AlphaTabApi(document.querySelector('#alphaTab'));
api.beatMouseMove.on((beat) => {
expandSelectionToBeat(beat);
});
$('#alphaTab').on('alphaTab.beatMouseMove', (e, beat) => {
originalEvent.preventDefault();
expandSelectionToBeat(beat);
});
document.querySelector('#alphaTab').addEventListener('alphaTab.beatMouseMove', (e) => {
var beat = e.detail;
e.originalEvent.preventDefault();
expandSelectionToBeat(beat);
}, false);
var api = new AlphaTabApi<MyControl>(...);
api.BeatMouseMove.On(beat =>
{
ExpandSelectionToBeat(beat);
});
val api = AlphaTabApi<MyControl>(...)
api.beatMouseMove.on { beat ->
expandSelectionToBeat(beat)
}