1
0
mirror of https://github.com/Pomax/BezierInfo-2.git synced 2025-09-01 12:23:19 +02:00

why is bezierinfo not updating?

This commit is contained in:
Pomax
2019-08-21 12:46:54 -07:00
parent cf7b015661
commit 38cb467e46
5 changed files with 10 additions and 6 deletions

View File

@@ -28,7 +28,7 @@ var baseClass = {
<figcaption>
<a className="source" href={sourceLink}>view source</a>
{this.props.title}
{this.state && this.state.sliders && this.renderSliders(this.state.sliders)}
{this.renderSliders()}
{this.props.children}
</figcaption>
</figure>
@@ -36,7 +36,11 @@ var baseClass = {
},
// Note: requires `sliders` and `onSlide` _and_ `context` to be set!
renderSliders: function(sliders) {
renderSliders: function() {
if (!this.state) return;
if (!this.state.sliders) return;
var sliders = this.state.sliders;
var api = this;
var onSlide = this.props.onSlide.bind(this.props.context);
return sliders.map(function(v, pos) {