mirror of
https://git.rwth-aachen.de/acs/public/villas/web/
synced 2025-03-09 00:00:01 +01:00
slider: add new property to continously update values
This commit is contained in:
parent
235f3e249d
commit
832b639090
2 changed files with 5 additions and 1 deletions
|
@ -120,7 +120,8 @@ export default function createControls(widgetType = null, widget = null, session
|
|||
<EditWidgetTextControl key={0} widget={widget} controlId={'name'} label={'Text'} placeholder={'Enter text'} handleChange={e => handleChange(e)} validate={id => validateForm(id)} />,
|
||||
<EditWidgetOrientation key={1} widget={widget} validate={(id) => validateForm(id)} simulationModels={simulationModels} handleChange={(e) => handleChange(e)} />,
|
||||
<EditWidgetSimulatorControl key={2} widget={widget} validate={(id) => validateForm(id)} simulationModels={simulationModels} handleChange={(e) => handleChange(e)} />,
|
||||
<EditWidgetSignalControl key={3} widget={widget} input validate={(id) => validateForm(id)} simulationModels={simulationModels} handleChange={(e) => handleChange(e)} />
|
||||
<EditWidgetSignalControl key={3} widget={widget} input validate={(id) => validateForm(id)} simulationModels={simulationModels} handleChange={(e) => handleChange(e)} />,
|
||||
<EditWidgetCheckboxControl key={4} text={'Continous Update'} controlId={'continous_update'} widget={widget} input simulationModels={simulationModels} handleChange={(e) => handleChange(e)} />
|
||||
);
|
||||
break;
|
||||
case 'Button':
|
||||
|
|
|
@ -51,6 +51,9 @@ class WidgetSlider extends Component {
|
|||
}
|
||||
|
||||
valueIsChanging(newValue) {
|
||||
if (this.props.widget.continous_update)
|
||||
this.valueChanged(newValue);
|
||||
|
||||
this.setState({ value: newValue });
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue