Closed evfinkn closed 12 months ago
Thanks for reporting this, I'll investigate. Which Peaks,js version are you using?
Sorry, I should've specified. I'm experiencing this on the latest commit to master. Not sure what version it stopped working in since I updated to latest from version 2.1.0.
Actually, segment's editable
and labelText
attributes have the same issue of not updating using segment.update
. color
, startTime
, and endTime
are updated correctly.
This is really helpful feedback, thanks.
I'll need to rethink this change. In 2.1.0, updates cause the point/segment to be deleted and re-created, which was simple to implement and meant that updates would always work.
In the 3.0.0-beta development I changed this so that points/segments don't get deleted but instead have an internal update()
method that gets called when attributes are changed. The new way is more complex and not fully implemented yet.
This should be fixed in v3.0.0-beta.12. The marker update()
methods are now called correctly. If you're using custom markers, the migration guide explains how to update your code.
One limitation is that changing editable
is not currently implemented, but I'm not sure how important that is.
Thanks for the fix. I update editable
so that the drag markers can be hidden and shown, but it's not a big deal if it's not a priority fix 👍
Thanks, I'll see what I can do...
Changing segment editable
should now be working in v3.0.0-beta.13.
Works great. Thanks!
Updating a point's
color
,labelText
, andeditable
attributes usingpoint.update
doesn't redraw the point on the zoomview nor overview. If you seek to a different time and then back to the point, the point will be updated on the zoomview, but the overview remains unchanged. Note that updating the point's time works correctly, as does updating a segment.