New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
note start/end of interactive periods on document #7143
Conversation
846a440
to
6d80fc3
Compare
6d80fc3
to
e170cbb
Compare
This is seeming to fail due to two JS examples not working? Not sure what's going on there yet. |
e170cbb
to
4138845
Compare
Also three JS tests I thought were passing I had accidentally just commented out. Some problem with sinon/spy but I have not been able to to figure it out. @mattpap if nothing jumps out at you we can just close this PR and reject the issue with |
@bryevdv, |
4138845
to
90dfcb2
Compare
OK I believe I found the issue, the mocks for |
This should be pretty uncontroversial I will merge in the morning and cut a dev build unless there is comment. |
@_interactive_timestamp = Date.now() | ||
|
||
interactive_stop: (plot) -> | ||
if @_interactive_plot?.id == plot.id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bryevdv, what's the reason for comparing ids instead of just references (@_interactive_plot == plot
)?
This PR adds support for "linked" LOD by making the document centrally responsible to note the start/end/duration of interactive periods. This simplifies the code at the point of usage and allows for some simple unit tests to be added.
With this work, LOD start/end events are only triggered on the plot that originated the interactive period.
Here is an example script that can be used:
There are further refinements that could be made in the future. In particular the same simple LOD threshold applies for all plots but this is not always ideal. In particular default settings do not trigger LOD on the second plot in the
vector.py
example, because the data size for themulti_line
is small (92) even though the total number of points that make up those lines is much larger.