Skip to main content
100%

Draggable Images

✓ Published0🌍 Public
FFrissAnalytics
Last edited Oct 5, 2018
Created on Oct 5, 2018

Four circular portraits are rendered in an SVG scene, each showing a doctor’s image from an external URL, clipped to a circle and outlined with a gray ring. Using D3 v4’s `d3.drag` behavior, each group of image, clip-path, and outline can be dragged freely across a warm beige background, with the dragged element lowered behind the others on release. The code also defines a Gaussian blur filter and includes commented-out resizing transitions, though active functionality is limited to dragging.

AI-generated description

Experimenting with draggable and resizable images in D3. Unfortunately, using a clip-path to put the images within circles causes some problems with resizing.

TODO:

  • Implement something like this

forked from <a href='http://bl.ocks.org/tlfrd/'>tlfrd</a>'s block: <a href='http://bl.ocks.org/tlfrd/9d123cbd9e399e9450b25522eecdec38'>Draggable Images</a>

mit Licensed

Similar vizzes