I get positions every 100 ms and apply them to the DOM as follows:
const div = d3.select(container).selectAll('div').data(positions) div.enter() .append('div') div.transition() .duration(100) .style({ top: d => dy, left: d => dx, }) div.exit() .remove()
Thus, the elements receive smooth animation for new positions of 100 ms, which are necessary to obtain the following positions. It works great.
But I have different elements in the DOM, which depend on the position of the first elements. They are displayed with the same position data, but in a different software module.
My problem is that this transition interpolates data not available to other modules. Elements of these other modules appear to provide "optically incorrect" visualizations, since they are based on raw data.
Example: a point moves to a square and the square is highlighted, but the position of the point is interpolated, and the position that the square uses to check whether it should be highlighted is not. Thus, the square is highlighted, even if the point is not inside it.
How do I get around this? Can I capture these interpolated values somewhere?
source share