1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Fix inactive sliderDragStarted/sliderDragEnded events in the WebView frontend library

This fixes the behaviour of WebBrowserComponent based plugins, including
the WebViewPluginDemo, when working with automations.
This commit is contained in:
attila 2024-07-04 10:15:25 +02:00 committed by Attila Szarvas
parent f1954bbe4d
commit 9082d3274a

View file

@ -120,6 +120,8 @@ class ListenerList {
const BasicControl_valueChangedEventId = "valueChanged";
const BasicControl_propertiesChangedId = "propertiesChanged";
const SliderControl_sliderDragStartedEventId = "sliderDragStarted";
const SliderControl_sliderDragEndedEventId = "sliderDragEnded";
/**
* SliderState encapsulates data and callbacks that are synchronised with a WebSliderRelay object
@ -187,12 +189,20 @@ class SliderState {
/**
* This function should be called first thing when the user starts interacting with the slider.
*/
sliderDragStarted() {}
sliderDragStarted() {
window.__JUCE__.backend.emitEvent(this.identifier, {
eventType: SliderControl_sliderDragStartedEventId,
});
}
/**
* This function should be called when the user finished the interaction with the slider.
*/
sliderDragEnded() {}
sliderDragEnded() {
window.__JUCE__.backend.emitEvent(this.identifier, {
eventType: SliderControl_sliderDragEndedEventId,
});
}
/** Internal. */
handleEvent(event) {