excalidraw/src
Gasim Gasimzada 33016bf6bf
Fix issues related to history (#701)
* Separate UI from Canvas

* Explicitly define history recording

* ActionManager: Set syncActionState during construction instead of in every call

* Add commit to history flag to necessary actions

* Disable undoing during multiElement

* Write custom equality function for UI component to render it only when specific props and elements change

* Remove stale comments about history skipping

* Stop undo/redoing when in resizing element mode

* wip

* correctly reset resizingElement & add undo check

* Separate selection element from the rest of the array and stop redrawing the UI when dragging the selection

* Remove selectionElement from local storage

* Remove unnecessary readonly type casting in actionFinalize

* Fix undo / redo for multi points

* Fix an issue that did not update history when elements were locked

* Disable committing to history for noops

- deleteSelected without deleting anything
- Basic selection

* Use generateEntry only inside history and pass elements and appstate to history

* Update component after every history resume

* Remove last item from the history only if in multi mode

* Resume recording when element type is not selection

* ensure we prevent hotkeys only on writable elements

* Remove selection clearing from history

* Remove one point arrows as they are invisibly small

* Remove shape of elements from local storage

* Fix removing invisible element from the array

* add missing history resuming cases & simplify slice

* fix lint

* don't regenerate elements if no elements deselected

* regenerate elements array on selection

* reset state.selectionElement unconditionally

* Use getter instead of passing appState and scene data through functions to actions

* fix import

Co-authored-by: David Luzar <luzar.david@gmail.com>
2020-02-05 19:47:10 +01:00
..
actions Fix issues related to history (#701) 2020-02-05 19:47:10 +01:00
components Fix issues related to history (#701) 2020-02-05 19:47:10 +01:00
element Fix issues related to history (#701) 2020-02-05 19:47:10 +01:00
locales Feature: Hint viewer (#666) 2020-02-03 09:52:21 -08:00
renderer Fix issues related to history (#701) 2020-02-05 19:47:10 +01:00
scene Fix issues related to history (#701) 2020-02-05 19:47:10 +01:00
appState.ts Fix issues related to history (#701) 2020-02-05 19:47:10 +01:00
bug-issue-template.js fix: typos (#540) 2020-01-24 21:02:55 +01:00
clipboard.ts Eslint tweaks (#696) 2020-02-05 17:41:14 +01:00
global.d.ts support export canvas to clipboard (#232) 2020-01-09 17:37:08 +01:00
history.ts Fix issues related to history (#701) 2020-02-05 19:47:10 +01:00
i18n.ts Added Norwegian Bokmål (#685) 2020-02-03 13:38:07 +01:00
index-node.ts SVG export (#598) 2020-01-28 12:25:13 -08:00
index.tsx Fix issues related to history (#701) 2020-02-05 19:47:10 +01:00
keys.ts Panning with space key (#579) 2020-01-30 17:08:59 -03:00
math.ts Reintroduce multi-point arrows and add migration for it (#635) 2020-02-01 15:49:18 +04:00
react-app-env.d.ts TS, Prettier, Eslint (#39) 2020-01-02 11:03:48 -08:00
shapes.tsx Add more ESLint rules and change the formatting scripts (#626) 2020-02-02 18:04:35 +00:00
styles.scss Add button when scrolled outside of visible area (#643) 2020-02-01 17:52:10 +01:00
theme.css Use relative CSS units (#484) 2020-01-20 14:59:00 -08:00
types.ts Fix issues related to history (#701) 2020-02-05 19:47:10 +01:00
utils.ts rewrite clipboard handling (#689) 2020-02-04 11:50:18 +01:00
zindex.test.ts Set Trailing Cmma to (#525) 2020-01-24 12:04:54 +02:00
zindex.ts fix: typos (#540) 2020-01-24 21:02:55 +01:00