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

feat: show a mid point for linear elements #5534

Merged
merged 19 commits into from
Aug 11, 2022

Conversation

ad1992
Copy link
Member

@ad1992 ad1992 commented Aug 4, 2022

midpoint.mp4

@vercel
Copy link

vercel bot commented Aug 4, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
excalidraw ✅ Ready (Inspect) Visit Preview Aug 11, 2022 at 2:42PM (UTC)
excalidraw-package-example ✅ Ready (Inspect) Visit Preview Aug 11, 2022 at 2:42PM (UTC)
1 Ignored Deployment
Name Status Preview Updated
docs ⬜️ Ignored (Inspect) Aug 11, 2022 at 2:42PM (UTC)

@maielo
Copy link
Contributor

maielo commented Aug 4, 2022

🔥 🔥 🔥 looking forward for this one !

@ad1992
Copy link
Member Author

ad1992 commented Aug 4, 2022

🔥 🔥 🔥 looking forward for this one !

On the way 😉

@ad1992 ad1992 requested a review from dwelle August 4, 2022 08:50
@dwelle
Copy link
Member

dwelle commented Aug 4, 2022

The goal is for the mid-point to be "phantom" until you click/drag on it. This way there's no actual point, unlike in current version where the point is always there, making the arrow 3-point from the start.

And in the future we may also allow adding more midpoints "forever" (until a given threshold).

Figma:

figma-phantom-points

We should also decide whether double-clicking on a point outside the editor should remove it.

@ad1992 ad1992 marked this pull request as draft August 4, 2022 10:27
@zsviczian
Copy link
Collaborator

Behavior is different if I drag the arrow (the mid point is added) and if I click, move the pointer and double click (the mid point is not added).

I agree with @dwelle that the mid-point should be invisible until used. If line sloppiness is cartoonist the mid-point breaks the continuity of the line which stylistically does not look very nice.
I also agree that this would make sense if mid-points would continue to sub sections of the line. In its current form I don't yet see the value add of this feature, rather the contrary, because of the line break effect as shown on the video. If you want a multi-point line you can click-move-click-move-doubleclick.

2022-08-04.13-34-06.mp4

.

@ad1992
Copy link
Member Author

ad1992 commented Aug 4, 2022

@zsviczian yes the point will be a phantom point. As for the initial release it will be just on mid of linear elements.
I am not sure if we should allow deleting via double click outside editor once added, I am thinking we can leave it for the line editor for deleting the points but its still open for discussion.
As per mid points between segments, we will be discussing that post the initial release.

@ad1992 ad1992 changed the title feat: Add a mid point for linear elements feat: show a mid point for linear elements Aug 8, 2022
src/components/App.tsx Outdated Show resolved Hide resolved
src/components/App.tsx Outdated Show resolved Hide resolved
src/components/App.tsx Outdated Show resolved Hide resolved
src/renderer/renderScene.ts Outdated Show resolved Hide resolved
@dwelle dwelle force-pushed the aakansha-linear-element-midpoint branch from 6f18d6d to 8d756cd Compare August 11, 2022 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants