beatMouseUp
Description​
This event is fired whenever the user releases the mouse after a mouse press on a beat. This event is fired regardless of whether the mouse was released on a beat. The parameter is null if the mouse was released somewhere beside the beat.
beatMouseUpJavaScript |
alphaTab.beatMouseUpjQuery |
alphaTab.beatMouseUpHTML |
BeatMouseUp.net |
beatMouseUpAndroid |
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 released over after mouse down. Might be null if no beat could be found in near location. |
beat.net | AlphaTab.Model.Beat | Beat on which the mouse was released over after mouse down. Might be null if no beat could be found in near location. |
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. |
beatAndroid | alphaTab.model.Beat | Beat on which the mouse was released over after mouse down. Might be null if no beat could be found in near location. |
Examples​
- JavaScript
- HTML
- jQuery
- C#
- Android
const api = new alphaTab.AlphaTabApi(document.querySelector('#alphaTab'));
api.beatMouseUp.on((beat) => {
hideSelection(beat);
});
$('#alphaTab').on('alphaTab.beatMouseUp', (e, beat) => {
originalEvent.preventDefault();
hideSelection(beat);
});
document.querySelector('#alphaTab').addEventListener('alphaTab.beatMouseUp', (e) => {
const beat = e.detail;
e.originalEvent.preventDefault();
hideSelection(beat);
}, false);
var api = new AlphaTabApi<MyControl>(...);
api.BeatMouseUp.On(beat =>
{
HideSelection(beat);
});
val api = AlphaTabApi<MyControl>(...)
api.beatMouseUp.on { beat ->
hideSelection(beat)
}