Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drag and Drop shapes #24

Open
marr opened this issue Mar 20, 2020 · 4 comments
Open

Drag and Drop shapes #24

marr opened this issue Mar 20, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@marr
Copy link

marr commented Mar 20, 2020

Hi, thanks for this tool. It works great!
Would it be possible to allow the cursor tool to support drag and drop of shapes? So when clicking the select tool, I could select a shape that was drawn and move it on the board. This is different than the rectangular tool, in that it selects the actual shape, and not a rectangular selection around the shape.

Thank you

@cracker0dks
Copy link
Owner

TLDR: Hard task, can't do it at the moment sry.

Details:
This would be a very hard task since we need to find the shape first (this is not as easy as it sounds) If you draw a line (with the line tool), this is represented as two points in the background so if someone clicks somewhere on the canvas, how do we know that this line is meant or not? We would need to "follow the color" or something like that... or show the start and endpoint of lines so we can move them? But what about pen draws then? What is defined as shape anyway?
Maybe someone has a good idea and is motivated to implement, I can't do it atm, sry.

@cracker0dks cracker0dks added the enhancement New feature or request label Mar 20, 2020
@marr
Copy link
Author

marr commented Mar 24, 2020

Thanks for the response. What would you think about a feature that allowed for certain svgs to be brought into the canvas, like UML elements? Is that something you think would be possible? I guess I don't know the limitations of canvas, but with draw.io, there are shapes that can be dragged into the canvas and scaled and moved. Is that easier when the shapes are pre-defined?

@cracker0dks
Copy link
Owner

we could add predefined elements pretty easy but they would behave like an image you drop in right now. Ether drawn to the canvas or the background. Only the rotation is missing for this to work properly I guess.

Workaround for now (If you don't need the rotation): You could make a folder with all the UML Elements you need (as images) and drop them in.
Greetings

@cracker0dks
Copy link
Owner

fyi: added function to rotate images

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants