1
0
Fork 0
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:
Steffen Vogel 2018-06-04 18:07:03 +02:00
parent 235f3e249d
commit 832b639090
2 changed files with 5 additions and 1 deletions

View file

@ -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':

View file

@ -51,6 +51,9 @@ class WidgetSlider extends Component {
}
valueIsChanging(newValue) {
if (this.props.widget.continous_update)
this.valueChanged(newValue);
this.setState({ value: newValue });
}