I'm getting positions every 100ms and apply them to the DOM like this:
const div = d3.select(container).selectAll('div').data(positions)
div.enter()
.append('div')
div.transition()
.duration(100)
.style({
top: d => d.y,
left: d => d.x,
})
div.exit()
.remove()
So the elements get a smooth animation to the new positions in the 100ms it takes to get the next positions. This works fine.
But I have different elements in the DOM that depend on the position of the first elements. They are rendered with the same position data, but in a different module of the software.
My problem is, that this transition interpolates data that is not available to the other modules. The elements of these other modules seem to deliver "optically wrong" visualizations, because they're based on the raw data.
Example: A point moves into a square and the square gets highlighted, but the position of the point is interpolated and the position the square uses to check if it should be highlighted is not. So the square gets highlighted even if the point isn't inside it.
How do I get around this? Can I grab those interpolated values somewhere?