Thank you everyone! What a surprise to be on HN today. Happy to answer questions!
Have you looked at html's built-in draggable="true" attribute and drag events? Are there shortcomings with the built-in feature compared to your code? https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement... https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement... https://developer.mozilla.org/en-US/docs/Web/HTML/Global_att...
> Note that this is not the HTML Drag and Drop API, which involves dragging an element onto another element. For my diagrams, I’m dragging but not dropping, and the scrubbable number example shows how I’m not necessarily even moving something around. So I need to read the mouse/touch events directly.
The drag and drop API is doing a different thing that isn't always appropriate - you can get it to do roughly what this article is talking about by making the thing being dragged invisible just after the dragging starts, but it can shrink things and doesn't let you edit them as DOM nodes after the dragging has started. It also lets you drag something out of the browser window and try to put it into a completely different window.