I set the interface
type to number
and the DEFAULT_SETTINGS
to 0
, but the default value for it appears as 50
.
Also, .setLimits(0, 10, 1)
shows a default value of 10. Perhaps the default value is fixed at 50
?
Hmmm, this worked for now.
addSlider((cb) => {
let value;
if (settings_value) {
value = settings_value;
} else {
value = default_value;
}
cb.setValue(value)
I found the cause.
So far, I have done the following.
export interface Set1 {
slider:number;
}
export interface MySettings {
set1:Set1
}
export const DEFAULT_SETTINGS: MySettings = {
set1: {
slider: 0
}
When I changed it this way, it recognized the DEFAULT_SETTINGS.
export interface MySettings {
set1_slider: number;
}
export const DEFAULT_SETTINGS: MySettings {
set1_slider: 0
}