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

Issues with zero length arrows and labels #2749

Closed
mimecuvalo opened this issue Feb 6, 2024 · 1 comment
Closed

Issues with zero length arrows and labels #2749

mimecuvalo opened this issue Feb 6, 2024 · 1 comment
Assignees

Comments

@mimecuvalo
Copy link
Member

Two related bugs:

Unlabelled arrows

  1. Make two rectangles.
  2. Move them next to each with snapping, so that they're touching.
  3. Draw an arrow from the center of one rectangle to the center of the other one.

Expected: No errors in console.
Actual: Errors in console.

Labelled arrows

  1. Draw an arrow.
  2. Give it a label.
  3. Make two rectangles.
  4. Move them next to each with snapping, so that they're touching.
  5. Draw an arrow from the center of one rectangle to the center of the other one.
  6. Try to click somewhere else on the canvas.

Actual: You can't click on any other shape.

@mimecuvalo mimecuvalo self-assigned this Feb 6, 2024
Copy link

linear bot commented Feb 6, 2024

github-merge-queue bot pushed a commit that referenced this issue Feb 6, 2024
The cursor was updating for the arrow label even when in other tools
(e.g. Draw) and it should only be updating when in Select mode. That
addresses this issue: #2750

Also, there was a problem with arrows and zero length arrows and labels.
The problem was actually in `Vec.ts` where we were dividing by zero.
Addresses this bug #2749

### Change Type

- [x] `patch` — Bug fix

### Test Plan

1. Make sure that the cursor is only applicable to the Select tool.

### Release Notes

- Cursor tweak for arrow labels.
@linear linear bot closed this as completed Feb 6, 2024
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

No branches or pull requests

1 participant