Multitouch Drag II
✓ Published0🌍 Public
Mmbostock
Last edited Feb 9, 2016
Created on Mar 20, 2014
Twenty colored divs drift across the browser window, each rendered as a circle via CSS border-radius and positioned using a CSS transform translate. Dragging a circle with a mouse or touch lifts it visually: it expands, gains a soft box-shadow, and uses an elastic ease during the size transition. The implementation uses D3 v3’s `d3.behavior.drag` for pointer handling, `d3.scale.category10` for colors, and `d3.interpolate` to animate box-shadow between drag states. Data is randomly generated from 20 coordinate pairs.
AI-generated descriptionThis variant of the multitouch drag example uses HTML div elements rather than SVG circles. A fancy box shadow reinforces the sense that dragged circles are temporarily elevated above the page.
gpl-3.0 Licensed