diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2018-06-06 04:16:37 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2018-06-06 04:16:37 +0200 |
| commit | b92b633cf0c2d528e45c04828a9ce1f5679aeaa3 (patch) | |
| tree | e4d08933cdad76a8115b90527d7cc7d486f86f0d /app/client/common/slider.component.js | |
| parent | 2f4d1e9c43770ca4e72b736a08cd0e3b3945274f (diff) | |
frame count slider
Diffstat (limited to 'app/client/common/slider.component.js')
| -rw-r--r-- | app/client/common/slider.component.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/client/common/slider.component.js b/app/client/common/slider.component.js index 942640a..fccbc5e 100644 --- a/app/client/common/slider.component.js +++ b/app/client/common/slider.component.js @@ -10,7 +10,7 @@ class Slider extends Component { super(props) this.timeout = 0 this.state = { - value: props.opt[props.name] + value: props.live ? props.opt[props.name] : props.value } this.handleInput = this.handleInput.bind(this) this.handleRange = this.handleRange.bind(this) @@ -33,7 +33,7 @@ class Slider extends Component { } if (old_value !== new_value) { this.setState({ value: new_value }) - this.props.actions.set_param(this.props.name, new_value) + this.props.live && this.props.actions.set_param(this.props.name, new_value) this.props.onChange && this.props.onChange(new_value) } clearTimeout(this.timeout) @@ -49,7 +49,7 @@ class Slider extends Component { } this.setState({ value: new_value }) this.timeout = setTimeout(() => { - this.props.actions.set_param(this.props.name, new_value) + this.props.live && this.props.actions.set_param(this.props.name, new_value) this.props.onChange && this.props.onChange(new_value) }, SLIDER_THROTTLE_TIME) } |
