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

Aligns arrowhead schemas #2517

Merged
merged 1 commit into from Dec 12, 2020

Conversation

steveruizok
Copy link
Contributor

As mentioned in #2516, elements currently store their arrowheads as...

// linear element

{
  ...,
  arrowheadStart: Arrowhead | null,
  arrowheadEnd: Arrowhead | null,
}

...while the appState stores the user's arrowhead selections as:

// app state

{
  ...,
  currentItemArrowheads: {
    start: Arrowhead | null,
    end: Arrowhead | null
  }
}

This PR aligns the two schemas.

In this PR, the app now stores a user's arrowhead selection as appState.currentItemStartArrowhead and appState.currentItemEndArrowhead.

// app state

{
  ...,
  currentItemArrowheadStart: Arrowhead | null,
  currentItemArrowheadEnd: Arrowhead | null,
}

@vercel
Copy link

vercel bot commented Dec 12, 2020

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/r39x57plb
✅ Preview: https://excalidraw-git-align-arrowhead-appstate.excalidraw.vercel.app

@dwelle
Copy link
Member

dwelle commented Dec 12, 2020

Thanks ❤️

@dwelle dwelle merged commit 9cfe7b4 into excalidraw:master Dec 12, 2020
lipis added a commit that referenced this pull request Dec 14, 2020
…aster

* 'master' of github.com:excalidraw/excalidraw: (41 commits)
  feat: export exportToCanvas in utils (#2583)
  Bump @types/jest from 26.0.16 to 26.0.19 (#2578)
  Bump @sentry/browser from 5.28.0 to 5.29.0 (#2561)
  Bump pepjs from 0.5.2 to 0.5.3 (#2550)
  Bump husky from 4.3.0 to 4.3.6 (#2575)
  Bump typescript from 4.0.5 to 4.1.3 (#2569)
  Bump eslint-plugin-prettier from 3.1.4 to 3.3.0 (#2573)
  Bump browser-nativefs from 0.11.1 to 0.11.2 (#2577)
  Bump @sentry/integrations from 5.28.0 to 5.29.0 (#2579)
  chore: Update user for packages
  chore: Add dependabot configuration (#2535)
  feat: Add zoom to fit for selected elements (#2522)
  ci: Add github action to make sure changelog for @excalidraw/excalidraw is updated (#2518)
  RTL support for the stats dialog (#2530)
  Insert Library items in the middle of the screen (#2527)
  Show shortcut context menu (#2501)
  Aligns arrowhead schemas (#2517)
  Expand canvas padding based on zoom. (#2515)
  Fix Library Menu Layout (#2502)
  Add Cut to menus (#2511)
  ...
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

2 participants