You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This can create potentially thousands of little line nodes. It would be better to have a single Path node and update a Kite Shape on each change to the data series. Note that in order to have this work for the path, you'll need to set the shape to null. In pseudo code, you'll need to do something like this:
path.shape = null;
update the shape by adding the new data point
path.shape = shape
From the client standpoint, the answer is that if you don't do this, it doesn't work.
If you're asking about why Scenery requires this, my guess is that it is necessary because otherwise the Path assumes that the shape is immutable once supplied (@jonathanolson mentioned something about this), so no update will occur if the shape is set to the same value.
MembranePotentialChart.js currently contains the following code:
This can create potentially thousands of little line nodes. It would be better to have a single Path node and update a Kite Shape on each change to the data series. Note that in order to have this work for the path, you'll need to set the shape to null. In pseudo code, you'll need to do something like this:
path.shape = null;
update the shape by adding the new data point
path.shape = shape
This was found during code review, see #29.
The text was updated successfully, but these errors were encountered: