Commit Graph

2814 Commits (9929a2be6f5881900a3a1042fef755d8fdc6d8bf)
 

Author SHA1 Message Date
zsviczian 9929a2be6f
fix: double state update incorrectly resetting state (#5704)
Co-authored-by: David Luzar <luzar.david@gmail.com>
2 years ago
David Luzar 9cccac1458
feat: further reduce darkmode init flash (#5701)
* feat: further reduce darkmode init flash

* fix lint

* tweak doc

* colocate code
2 years ago
Abdullah Adeel 7eaf47c9d4
fix: default light theme splash 🔧 (#5660)
Co-authored-by: dwelle <luzar.david@gmail.com>
Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
2 years ago
Seunghyun oh ec4b3d913e
fix: remove no longer used code related to collab room loading (#5699)
Co-authored-by: dwelle <luzar.david@gmail.com>
2 years ago
Aakansha Doshi 5390617c01
test: add more specs for line editor segment midpoints (#5698)
* tests: add more specs for line editor segment midpoints

* use API to create elements

* Add specs for checking midpoint hidden when points too close
2 years ago
Aakansha Doshi 0d1058a596
feat: support segment midpoints in line editor (#5641)
* feat: support segment midpoints in line editor

* fix tests

* midpoints working in bezier curve

* midpoint working with non zero roughness

* calculate beizer curve control points for points >2

* unnecessary rerender

* don't show phantom points inside editor for short segments

* don't show phantom points for small curves

* improve the algo for plotting midpoints on bezier curve by taking arc lengths and doing binary search

* fix tests finally

* fix naming

* cache editor midpoints

* clear midpoint cache when undo

* fix caching

* calculate index properly when not all segments have midpoints

* make sure correct element version is fetched from cache

* chore

* fix

* direct comparison for equal points

* create arePointsEqual util

* upate name

* don't update cache except inside getter

* don't compute midpoints outside editor unless 2pointer lines

* update cache to object and burst when Zoom updated as well

* early return if midpoints not present outside editor

* don't early return

* cleanup

* Add specs

* fix
2 years ago
Seunghyun oh c5869979c8
chore: fix typo in clipboard alert (#5693)
chore: fix typo
2 years ago
David Luzar 6a6b9c90a7
fix: revert webpack deduping to fix `@next` runtime (#5695)
Revert "chore: Dedupe webpack configs. (#5449)"

This reverts commit da4fa91ffc.
2 years ago
Aakansha Doshi 5c17751662
fix: Move to release notes for v0.9.0 and after (#5686)
* fix: Move to release notes for v0.9.0 and after

* fix
2 years ago
Ryan Di 898789b979
chore: update lib menu click outside callback comment (#5687) 2 years ago
Ikko Ashimine 7922ce129e
chore: fix typo in blob.ts (#5664)
Co-authored-by: David Luzar <luzar.david@gmail.com>
2 years ago
David Luzar 59ec1c6cee
fix: zen-mode exit button not working (#5682) 2 years ago
Igor Berlenko 933c6a2237
build: add missing dependencies: pica, lodash (#5656)
* add missing dependencies: pica, lodash

* remove lodash & fix yarn.lock

* first

* second

Co-authored-by: dwelle <luzar.david@gmail.com>
2 years ago
zsviczian cd61f31116
fix: buttons jump around on the mobile menu (#5658)
Update MobileMenu.tsx
2 years ago
Abdullah Adeel b3052f0178
fix: #5622 - prevent session theme reset during collaboration (#5640)
*  fixed #5622 - prevent session theme reset

 -  prevent newly initialized state to override theme preferences.
 - 🔧 fix for #5622

* refactor

Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
2 years ago
Excalidraw Bot a271e42af1
chore: Update translations from Crowdin (#5596)
* New translations en.json (Vietnamese)

* Auto commit: Calculate translation coverage

* New translations en.json (Lithuanian)

* Auto commit: Calculate translation coverage

* New translations en.json (Lithuanian)

* Auto commit: Calculate translation coverage

* New translations en.json (Bengali)

* Auto commit: Calculate translation coverage

* New translations en.json (Bengali)

* Auto commit: Calculate translation coverage
2 years ago
zsviczian 836120c14b
feat: added exportPadding to PNG (blob) export in @excalidraw/utils (#5626)
* added exportPadding

* Update README.md

* Update CHANGELOG.md
2 years ago
DanielJGeiger da4fa91ffc
chore: Dedupe webpack configs. (#5449)
* chore: Dedupe package dependencies and webpack configs.

* Fully dedupe `src/packages` via symlinks

* Merge https://github.com/excalidraw/excalidraw into dedupe-package-deps-configs

* fix: Link `tsc` so `build:example` works in @excalidraw/excalidraw

* @excalidraw/plugins: Revert the `yarn.lock` deduping.

* Drop yarn commands from the root `package.json`.

* Remove more unneeded `package.json` additions.

* One more change to drop in `package.json` files.

* Deduping: Move even more into common webpack configs.

* renaming

Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
2 years ago
Aakansha Doshi 553b493f37
fix: library actions inside the sidebar (#5638) 2 years ago
Ives van Hoorne 59a1d192d2
chore: update CodeSandbox links and add a config (#5624)
* chore: update CodeSandbox links and add a config

* Update tasks.json
2 years ago
Aakansha Doshi 8b7302e89e
fix: don't render library menu twice for mobile (#5636) 2 years ago
David Luzar f9b7cfd8aa
fix: reintroduce help dialog button (#5631) 2 years ago
Aakansha Doshi 2b4462c941
refactor: reuse common ui dialogs and message for mobile and LayerUI (#5611)
* refactor: Move common UI dialogs to component

* refactor

* fix
2 years ago
Aakansha Doshi 43b13d8e3a
fix: Add display name to components so it doesn't show as anonymous (#5616) 2 years ago
Ryan Di 720f468f39
fix: improve solveQuadratic when a = 0 (#5618) 2 years ago
Ryan Di 33300d19f6
fix: add random tiny offsets to avoid linear elements from being clipped (#5615)
Co-authored-by: Ryan Di <ryandi@Ryans-MacBook-Pro.local>
2 years ago
Aakansha Doshi 5aed159991
docs: fix refs table (#5614)
* docs: fix refs table

* fix

* fix

* fix

* fix
2 years ago
Aakansha Doshi de1d221d1c
docs: add PR link (#5613)
docs:add PR link
2 years ago
Aakansha Doshi 9a68dbffe2
docs: update docs for param defaultStatus in loadLibraryFromBlob (#5612) 2 years ago
Aakansha Doshi 32d82219b1
refactor: Stats component (#5610)
refactor: stats component
3 years ago
Aakansha Doshi ba2c86fe1b
refactor: Move footer to its own component (#5609) 3 years ago
zsviczian f1ae37c84b
fix: Crash when adding a new point in the line editor #5602 (#5606)
Update linearElementEditor.ts
3 years ago
Aakansha Doshi ec350ba8b2
feat: Introduce ExcalidrawElements and ExcalidrawAppState provider (#5463)
* feat: Introduce ExcalidrawData provider so that app state and elements need not be passed to children

* fix

* fix zen mode

* Separate providers for data and elements

* pass appState and elements to layerUI

* pass appState and elements to selectedShapeActions

* pass appState and elements to MobileMenu

* pass appState to librarymenu

* rename

* rename to ExcalidrawAppState
3 years ago
Aakansha Doshi 46a61ad4df
feat: enable midpoint inside linear element editor (#5564)
* feat: enable midpoint inside linear element editor

* fix

* fix

* hack to set pointerDownState.hit.hasHitElementInside when mid point added

* remove hacks as not needed :)

* remove newline

* fix

* add doc
3 years ago
Excalidraw Bot f4b1a30bef
chore: Update translations from Crowdin (#5552) 3 years ago
Aakansha Doshi 32aa79164b
refactor: remove unused attribute hasHitElementInside from pointerDownState (#5591) 3 years ago
Aakansha Doshi b5fd904808
fix: allow box selection of points when inside editor (#5594) 3 years ago
David Luzar 8f8dd1105f
docs: changelog fixes (#5593) 3 years ago
David Luzar b914ad41fc
feat: support `ExcalidrawElement.customData` (#5592)
Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
3 years ago
Aakansha Doshi 551c38f60b
fix: remove unnecessary conditions in pointerup for linear elements (#5575)
* fix: remove unnecessary conditions in pointerup for linear elements

* reset editingLinearElement when clicked inside bounding box
3 years ago
Aakansha Doshi 38e8ae46c9
fix: check if hitting link in handleSelectionOnPointerDown (#5589)
fix: check if hitting link in handleSelectionOnPoiinterDown
3 years ago
David Luzar ad0c4c4c78
fix: points not being normalized on single-elem resize (#5581) 3 years ago
Aakansha Doshi 27cf5ed17e
fix: deselect linear element when clicked inside bounding box outside editor (#5579) 3 years ago
Aakansha Doshi fd946adbae
refactor: cleanup renderScene (#5573)
* refactor: cleanup renderScene

* pass object instead of individual params
3 years ago
Caleb OLeary c37977af4b
docs: correct readme type typo (#5574) 3 years ago
Alex Kim a0d413ab4e
fix: resize multiple elements from center (#5560)
Co-authored-by: Ryan Di <ryan.weihao.di@gmail.com>
Co-authored-by: dwelle <luzar.david@gmail.com>
3 years ago
Aakansha Doshi b67a2b4f65
fix: call static methods via class instead of instance in linearElementEditor (#5561)
* fix: call getMidPoint via class instead of instance

* fix

* fix
3 years ago
Aakansha Doshi 5a8dbe8030
feat: show a mid point for linear elements (#5534)
* feat: Add a mid point for linear elements

* fix tests

* show mid point only on hover

* hacky fix :(

* don't add mid points if present and only add outside editor

* improve styling and always show phantom point instead of just on hover

* fix tests

* fix

* only add polyfill for test

* add hover state for phantom point

* fix tests

* fix

* Add Array.at polyfill

* reuse `centerPoint()` helper

* reuse `distance2d`

* use `Point` type

Co-authored-by: dwelle <luzar.david@gmail.com>
3 years ago
Aakansha Doshi 731093f631
fix: show bounding box for 3 or more linear point elements (#5554)
* fix: show bounding box for 3+ linear point elements

* refactor

* show bounding box for 3 points as well

* fix dragging bounding box for linear elements

* Increase margin/padding for linear elements

* fix cursor and keep bounding box same but offset resize handles

* introduce slight padding for selection border

* better

* add constant for spacing
3 years ago
Aakansha Doshi fe56975f19
fix: cleanup the condition for dragging elements (#5555) 3 years ago