LaserWeb / LaserWeb4

Collaborative effort on the next version of LaserWeb / CNCWeb
GNU Affero General Public License v3.0
706 stars 191 forks source link

Drag and drop opens file instead of adding it #631

Open github-throwaway opened 2 years ago

github-throwaway commented 2 years ago

If you drag a file to the workspace it does not get added but is rather opened. There is no way to go back, you manually have to restart LaserWeb.

laserweb

Laserweb-Workspace.json.txt

cprezzi commented 2 years ago

Drag & Drop was never implemented, and because the frontend is basically a webbrowser, the default behavior to dropping is changing the url to the dropped file. I will check if I could change this.

easytarget commented 2 years ago

I'll see what I can do in my work too; this looks relevant: https://stackoverflow.com/questions/6756583/prevent-browser-from-loading-a-drag-and-dropped-file?rq=1 The trick will be still allowing drag-n-drop in the files/operations tab when assembling jobs..

easytarget commented 2 years ago

This is now in my fork, hopefully it will be merged to the main branch soon.

Works well, doesnt interfere with in-window dragging, and guides new users into what to do. https://github.com/easytarget-org/LaserWeb4/commit/4822c19a5e5f8350025c4f79f26deaa4e93d1000

github-throwaway commented 5 months ago

@cprezzi should we get this merged?