-
Notifications
You must be signed in to change notification settings - Fork 946
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
Page refresh for notebook does not work for widgets with buffers #1642
Comments
to install, |
Yes, that should work (not sure if I have time for that soon) |
I'm working on a simple example by converting the Image widget to use binary transfer now that we have it. I think it will be good to have at least one controls widget using the binary transfer. |
At least one problem is jashkenas/underscore#2692 - since underscore seems to treat all dataviews and array buffers as equal, the appropriate change handlers are not called when a binary attribute is set if it is just a dataview or array buffer. |
What does lodash say? |
Looking more into it, it seems that underscore is pretty much abandoned at this point. Lodash 4.17.4 returns the correct result, but it's not clear at all how to change backbone to depend on lodash without actually changing the backbone package to something else. I think this is another vote for replacing backbone in widgets. |
For now, I'm working on a workaround. |
See also my msg #1339 (comment) about _.eq being really slow (comparing each element), so it's slow and/or broken. Would be nice if that can be worked around as well. |
ah yes, I thought I remembered seeing another problem with underscore's equality checking. Thanks. |
Actually, my workaround is to default to that really slow checking! I'm not sure of another way to work around the deficiency in underscore. |
Underscore 1.8.3’s _.eq assumes all DataView and ArrayBuffers are the same, so backbone will not trigger a change event when attributes are set (see jashkenas/underscore#2692). Lodash 4 does distinguish between different dataviews or arraybuffers, but I can’t figure out how to get backbone to depend on lodash instead of underscore, and don’t want to try changing such a fundamental thing this close to a release. Fixes jupyter-widgets#1642
Underscore 1.8.3’s _.eq assumes all DataView and ArrayBuffers are the same, so backbone will not trigger a change event when attributes are set (see jashkenas/underscore#2692). Lodash 4 does distinguish between different dataviews or arraybuffers, so we'll use the Lodash isEqual. Fixes jupyter-widgets#1642
Using latest ipyvolume on pypi:
Refresh, and one of my deserializers is missing a .buffer property.
The text was updated successfully, but these errors were encountered: