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

Feature: Draw rectangles at angle, determined by a line. #1323

Open
strfx opened this issue Mar 1, 2023 · 3 comments
Open

Feature: Draw rectangles at angle, determined by a line. #1323

strfx opened this issue Mar 1, 2023 · 3 comments

Comments

@strfx
Copy link
Contributor

strfx commented Mar 1, 2023

Hi there!

I think it would be great to have a feature that lets users draw rectangles at an angle, based on a previously drawn line. I hacked together a proof of concept to demonstrate the idea:

example-rotated-rectangle

You can play around with the example in this JSFiddle: https://jsfiddle.net/n9kz4atx/24/.

What do you think? I'd be excited to work on a PR if this is something you'd like to have in geoman.

Thanks for the great work!

@Falke-Design
Copy link
Collaborator

Nice idea, but I don't know if we should implement it in the core code. I will discuss it with @codeofsumit

@codeofsumit
Copy link
Contributor

@strfx this look great.
I talked with @Falke-Design and we would appreciate a pull request that implements this as follows:

  1. Add a global option adjustRectAngleWhileDraw - default is false
  2. If set to true, the behavior shown in the GIF should be the default when in Draw Mode for Rectangles.

@strfx
Copy link
Contributor Author

strfx commented Jun 7, 2023

thanks for the feedback @codeofsumit and @Falke-Design - approach sounds sensible! Will follow up with a PR soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants