Fast long-scrolling image grid re-using exit nodes

119 views
Skip to first unread message

Gregor MacLennan

unread,
Apr 21, 2014, 12:01:33 AM4/21/14
to d3...@googlegroups.com
I made this block as an example of how to implement long-scrolling in d3.js

I needed a grid of images for a photo app, and I wanted it to scroll fast. I re-use exit nodes as enter nodes to reduce modifications to the DOM, and only modify cheap to animate CSS properties. Only tested on Chrome, it loads 500,000 images from flickr and runs smoothly on my machine. 


I'm a new-comer to d3 and this is my first attempt at a block. I'd welcome any feedback if there is an obvious way of re-using these exit nodes that I am not noticing.
Reply all
Reply to author
Forward
0 new messages