Skip to content

feat: support selecting multiple points when editing line#4373

Merged
dwelle merged 2 commits into
masterfrom
line_editor_improvements
Dec 13, 2021
Merged

feat: support selecting multiple points when editing line#4373
dwelle merged 2 commits into
masterfrom
line_editor_improvements

Conversation

@dwelle

@dwelle dwelle commented Dec 6, 2021

Copy link
Copy Markdown
Member
  • Added support for selecting multiple points (via Shift-click) when inside line editor.
  • Second commit adds support for box-selection of points (drag, Shift-drag, Cmd-drag)

(Reviewable by commits.)

@vercel

vercel Bot commented Dec 6, 2021

Copy link
Copy Markdown

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/excalidraw/excalidraw/3Mso4Pwxgt9VJQJ5MTxCtfiijaf4
✅ Preview: https://excalidraw-git-lineeditorimprovements-excalidraw.vercel.app

@ad1992

ad1992 commented Dec 13, 2021

Copy link
Copy Markdown
Member

Looks great 🎉
one concern when selecting multiple points, and trying to use other shape, it doesn't work until I click once
Excalidraw (16)

@dwelle

dwelle commented Dec 13, 2021

Copy link
Copy Markdown
Member Author

one concern when selecting multiple points, and trying to use other shape, it doesn't work until I click once

Yeah, I had to make a decision between adding friction to exiting the editor or making it harder to select points when inside the editor (needing to be careful if the box selection doesn't cover neighboring elements). Since the whole point of being in a line editor to edit the line, I thought the former is more appropriate. This also aligns it with Figma, Affinity etc.

I also wanna investigate supporting editing multiple lines at the same time, which would only exacerbate the problem if we allow selecting outside elements.

@ad1992

ad1992 commented Dec 13, 2021

Copy link
Copy Markdown
Member

one concern when selecting multiple points, and trying to use other shape, it doesn't work until I click once

Yeah, I had to make a decision between adding friction to exiting the editor or making it harder to select points when inside the editor (needing to be careful if the box selection doesn't cover neighboring elements). Since the whole point of being in a line editor to edit the line, I thought the former is more appropriate. This also aligns it with Figma, Affinity etc.

I also wanna investigate supporting editing multiple lines at the same time, which would only exacerbate the problem if we allow selecting outside elements.

I think the behaviour of just allowing multiple points and not any other shape during box selection is fine, but if user tries to interact with any other shape then we should exit the line editor ?

@dwelle

dwelle commented Dec 13, 2021

Copy link
Copy Markdown
Member Author

I think the behaviour of just allowing multiple points and not any other shape during box selection is fine, but if user tries to interact with any other shape then we should exit the line editor ?

If you mean exiting the editor on pointerdown, then we can't do that if we wanna support box-selecting the points. Maybe when you box-select no points, but it'd again result a lot of false-positive editor exits. All in all, I'd rather align with the vector-editor standard here.

Btw, long-term the line editor is meant to be something you do sparingly. We will add basic support for adding line points outside the editor as well. The line editor will become more of a power-user feature.

@dwelle dwelle merged commit 104664c into master Dec 13, 2021
@dwelle dwelle deleted the line_editor_improvements branch December 13, 2021 12:35
TusharSariya pushed a commit to TusharSariya/excalidraw-tf that referenced this pull request May 27, 2026
NavarroYahir pushed a commit to ludensproductions/excalidraw that referenced this pull request Jun 3, 2026
NavarroYahir pushed a commit to ludensproductions/excalidraw that referenced this pull request Jun 3, 2026
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.

2 participants