Refactor: extract drag_to_create.js