lo-th/uil

Graph.setValue needs to update internals

ndahn opened this issue · 1 comments

ndahn commented

Graph.setValue() is inherited, so it only updates Graph.value. But it also needs to update Graph.v and Graph.lng, otherwise the graphics won't be updated. Could be done the same way as in the constructor, i.e.

this.value = value;
this.lng = value.length;
for (var i = 0; i < this.lng; i++) {
    if (this.neg) _this.v[i] = (1 + value[i] / this.multiplicator) * 0.5;
    else this.v[i] = value[i] / this.multiplicator;
}
lo-th commented

Ok is fixed