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

The problem with straight lines - horizontal and vertical lines #801

Open
andrea78 opened this issue Nov 27, 2022 · 4 comments
Open

The problem with straight lines - horizontal and vertical lines #801

andrea78 opened this issue Nov 27, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@andrea78
Copy link

andrea78 commented Nov 27, 2022

Hi Younkue,
I really appreciate your great work. I love Moveable. I'm testing the latest version of Selecto and Moveable. Everything works fine but the only reason why I can't use Selecto with Moveable is because of the problem with straight lines. I mean horizontal and vertical lines.
If the line is not straight then there's no problem, but if the line is straight then I can't move it.
Draggable only works if I move at least two straight lines. Moreover if I want to scale or rotate straight line it doesn't work anymore. All other svg objects such as circle, rectangle, text etc. or foreignObject work fine.
This problem occurs in all popular browsers: Chrome, Edge, Opera, Safari and Firefox.
Examples below:

After selecting or clicking stright lines rotation position is "bottom" and it should be "top".

Screenshot 2022-11-27 at 21-44-11 Tablica Interaktywna MatMentora
Screenshot 2022-11-27 at 21-42-45 Tablica Interaktywna MatMentora
Screenshot 2022-11-27 at 21-42-23 Tablica Interaktywna MatMentora

Before scaling a group of lines. The red ones are stright. The green ones aren't stright.

Screenshot 2022-11-27 at 22-17-17 Tablica Interaktywna MatMentora

After scaling a group of lines. The red ones are stright. The green ones aren't stright.

Screenshot 2022-11-27 at 22-16-51 Tablica Interaktywna MatMentora

After rotating a group of lines. The red ones are stright. The green ones aren't stright.

Screenshot 2022-11-27 at 22-18-03 Tablica Interaktywna MatMentora

@daybrush daybrush added the bug Something isn't working label Nov 27, 2022
@daybrush
Copy link
Owner

@andrea78

Can you provide a code sandbox demo of the 4 examples?

daybrush added a commit that referenced this issue Nov 28, 2022
@daybrush
Copy link
Owner

@andrea78

moveable's new version is released. Check it again.

@andrea78
Copy link
Author

Hi Younkue,
Thank you for your work. After your fix #801 if a line is straight then I can't move it but now after selecting or clicking a single stright line rotation position is always on the "top". I mean in the right position.
Draggable only works if I move at least two straight lines. Moreover if I want to scale straight lines now it works but straight lines only scale horizontally. Examples below.

Before scaling a group of lines. The red ones are stright. The green ones aren't stright.

Screenshot 2022-11-30 at 23-26-30 Tablica Interaktywna MatMentora

After scaling a group of lines. The red ones are stright. The green ones aren't stright.

Screenshot 2022-11-30 at 23-26-56 Tablica Interaktywna MatMentora

After rotating a group of lines. The ones rotated 90 degrees to the right. The red ones are stright. The green ones aren't stright.

Screenshot 2022-11-30 at 23-28-08 Tablica Interaktywna MatMentora

@daybrush
Copy link
Owner

daybrush commented Dec 1, 2022

@andrea78

Can you give me a demo with codesandbox?

@daybrush daybrush removed the complete label Dec 1, 2022
@daybrush daybrush modified the milestone: 0.41.0 Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants