Open davidnmora opened 1 year ago
I've noticed a similar behaviour when jitter
is applied
All right, thanks for the note--I think this should now be fixed by moving these two lines of code inside a callback function from outside.. If you encounter it again, let me know.
Jitter is a bit more complicated. Fully placing points that are jittered would involve:
It would, all in all, usually be easier to actually make an additional draw call in webGL than to try to extract this state information and update it every tick, so I'm going to change the name of this issue to reflect that it's not supported but not promise to support it at any point soon..
@bmschmidt that makes!
Yeah the jitter issue seems small -- at worst a consumer could just hardcode a jitter into the dataset and encode it directly, or simply twaek the library to hide the SVG dot during times of jitter.
How to reproduce:
x
ory
to a give field & render scatter. Hover works properly.x
ory
property (usingx0
ory0
doesn't make a difference)The underlying issue:
Imagine we change from encoding y as
y_field_1
toy_field_2
.After the update, we'd see that the y aesthetic instance seems to remain out of date:
https://github.com/nomic-ai/deepscatter/blob/195e84444602e62dc591f5d6c1dc9c6ee031b321/src/interaction.ts#L179 ... https://github.com/nomic-ai/deepscatter/blob/195e84444602e62dc591f5d6c1dc9c6ee031b321/src/interaction.ts#L229-L230
where the value of
y_aes.field === 'y_field_1'
still.This is surprising because if you check during execution
field
is being correctly updated here:https://github.com/nomic-ai/deepscatter/blob/195e84444602e62dc591f5d6c1dc9c6ee031b321/src/Aesthetic.ts#L451
TODO: look further into why that update isn't showing up later when we're setting the SVG circle position.
Images of an example of updating
y
:Note in the second image, I'm hovering the new location of the purple dot, as indicated by a correctly positioned tooltip (which uses mouse position, I think)