block by eglassman 6f7cbde4826a86c18f92

Block

Full Screen

I would like to ink on some d3-created visualizations. I really like d3, so I thought I’d create the inking with it too, instead of introducing another library into my project.

However, I could only find one demo of d3-based inking: a block on bl.ocks.org by ‘cloudshape’.

It was almost exactly what I wanted, except there was this strange offset between where I placed my mouse, and where the line was drawn. So… I copied the code into Brackets and modified it until this offset was gone. I think it’s a small but significant improvement. Now I’m sharing it as a ‘block’ of my own!

Cloudshapes, thank you so much for creating the original drawing app. You did all this work, and I am grateful. I just changed one line of code!

index.html