752 Commits

Author SHA1 Message Date
David Luzar
c5d37a07c8
fix resize hints not showing due to LayerUI bailing on updates (#1952) 2020-07-24 13:29:36 +02:00
David Luzar
b07aa6e205
delay scene init until document active (#1920)
* delay scene init until document active

* use opts.once for the listener
2020-07-20 12:53:53 +02:00
Mohammed Salman
cf36cb394b
Library improvements (#1925)
Co-authored-by: David Luzar <luzar.david@gmail.com>
2020-07-19 23:12:56 +02:00
David Luzar
c1488fa353
try/catch localStorage access (#1932) 2020-07-17 18:39:23 +02:00
Mohammed Salman
bac20fa641
Choosing color before entering text does not update the swatch (Fixes #1897) (#1915)
Co-authored-by: dwelle <luzar.david@gmail.com>
2020-07-14 13:56:45 +02:00
Aakansha Doshi
953cd5563c
move the excalidraw props to correct file and typo fix (#1907) 2020-07-11 15:13:20 +02:00
Pete Hunt
6428b59ccb
Library MVP (#1787)
Co-authored-by: dwelle <luzar.david@gmail.com>
2020-07-10 11:20:23 +02:00
David Luzar
7ab0c1aba8
reload scene on hashchange (#1893)
* reload scene on hashchange

* tweak isLoading
2020-07-09 22:16:28 -07:00
Michal Srb
4ab4fce998
Refactoring in pointer down event handler, step 3 (#1888)
* Refactor: use pointer down state for alt duplication flag

* Refactor: use pointer down state for drag state

* Refactor: simplify over scrollbars check

* Refactor: move pointer move handler out of pointer down handler

* Refactor: move pointer up handler out of pointer down handler

* Refactor: further simplify scrollbar check state in pointer down event

* Refactor: pull out initial pointer down state creation
2020-07-09 14:15:42 -07:00
Michal Srb
5664de0459
Refactoring in pointer down event handler, step 2 (#1887)
* Refactor: introduce pointer down state to replace implicit closure state with an explicit object

* Refactor: use pointer down state for resize handle

* Refactor: use pointer down state for isResizing

* Refactor: use pointer down state for resizing offset

* Refactor: use pointer down state for hit element

* Refactor: move selection handling out of pointer down event handler

* Refactor: move text handling out of pointer down event handler

* Refactor: move linear tools handling out of pointer down event handler

* Refactor: move element creation out of pointer down handler
2020-07-09 09:30:38 -07:00
Michal Srb
5d7020cce6
Refactoring in pointer down event handler (#1880)
* Refactor: Move context menu touch device handling

* Refactor: Move more stuff out of pointer down

* Refactor: Move last coords into an object

* Refactor: Move scrollbar handling out of pointer down

* Refactor: simplify resizing in pointer down

* Refactor: further simplify resizing in pointer down

* Refactor: clarify clearing selection code

* Refactor: move out clearing selection from pointer down

* Refactor: further simplify deselection in pointer down
2020-07-08 22:07:51 -07:00
David Luzar
d5e7d08586
prompt when loading external scene before overriding local one (#1862) 2020-07-08 22:55:26 +02:00
David Luzar
df5eb3f0d9
change copy/paste styles shortcuts (#1881)
* change copy/paste styles shortcuts

* use keyCode
2020-07-07 20:22:23 +02:00
Aakansha Doshi
9351b2821c
feat: add width, height as props to App.tsx (#1871) 2020-07-07 17:10:39 +02:00
David Luzar
b1261eea70
duplicate point on cmd+d (#1831) 2020-07-07 13:53:44 +02:00
Oren Me
84abda82d5
docs: add multiple selection docs (#1875) 2020-07-07 11:24:07 +02:00
Mehedi Hassan
cc52ea4ac2
Add support for long press to context menu on iOS (#1769)
* Initial support for touch context menu

* Only deal with touch if it's available

* Fix touch checking

* Remove touch checking

* Added comments

* Combine onTouch with onPointer for mobile context menu support
2020-07-03 00:12:56 +03:00
Aakansha Doshi
b21f723eee
use absolute positioning instead of fixed (#1860) 2020-07-02 15:27:47 +02:00
Kostas Bariotis
0a3fb70ec7
Dynamicaly import locales (#1793)
* dynamicly import locales

* fix tests

* reformat languages
2020-06-27 12:02:54 +01:00
Lipis
5970bb7ee9
Remove duplicate string for toggle grid mode (#1821) 2020-06-26 22:28:01 +02:00
Saransh Barua
1991511ef7
Fix flickering outline on the dialogs while clicking (#1747) 2020-06-26 22:27:16 +02:00
David Luzar
cd87bd6901
do not center text when not applicable (#1783) 2020-06-25 21:21:27 +02:00
Daishi Kato
9c89504b6f
fix: start dragging grouped elements (#1818)
Co-authored-by: dwelle <luzar.david@gmail.com>
2020-06-24 13:38:42 +02:00
Daishi Kato
baa8fb6c14
grid support (1st iteration) (#1788)
Co-authored-by: dwelle <luzar.david@gmail.com>
2020-06-23 17:24:52 +02:00
Kostas Bariotis
a357d00bbe
Hint for shortcut for moving the visible area (#1784) 2020-06-19 22:28:13 +02:00
Oliver Benns
ca87ca6fe9
Add user list component + snap to user functionality (#1749) 2020-06-19 12:36:49 +02:00
Thomas Steiner
5d3867d8ac
Implement Save without re-prompt and Save as (#1709)
* Implement Save without re-prompt and Save as
Fixes #1668

* Add save-as icon

* Make .excalidraw the default extension

* Only show save as button on supporting browsers
2020-06-12 18:35:04 +02:00
Saransh Barua
998f0ae458
remove z-index for color-picker-hash div (#1711) 2020-06-08 06:52:54 -04:00
Aakansha Doshi
60973f6dc5
rename container class to excalidraw and move css from index.html to app.css (#1729)
Moved the css from index.html to app.css so it can be included in upstream app as well
2020-06-08 13:36:35 +03:00
Daishi Kato
53ab46126d
support resizing multiple elements including texts (#1726)
Co-authored-by: David Luzar <luzar.david@gmail.com>
2020-06-08 11:25:20 +02:00
Pete Hunt
f7c4efbd35
Excalicharts MVP (#1723)
Co-authored-by: David Luzar <luzar.david@gmail.com>
2020-06-06 22:09:04 +02:00
Steven Nguyen
fd75b88bd3
Double finger zoom should not select things (#1333) 2020-06-02 19:41:40 +03:00
David Luzar
14a66956d7
Implement line editing (#1616)
* implement line editing

* line editing with rotation

* ensure adding new points is disabled on point dragging

* fix hotkey replacement

* don't paint bounding box when creating new multipoint

* tweak points style, account for zoom and z-index

* don't persist editingLinearElement to localStorage

* don't mutate on noop points updates

* account for rotation when adding new point

* ensure clicking on points doesn't deselect element

* tweak history handling around editingline element

* update snapshots

* refactor pointerMove handling

* factor out point dragging

* factor out pointerDown

* improve positioning with rotation

* revert to use roughjs for calculating points bounds

* migrate from storing editingLinearElement.element to id

* make GlobalScene.getElement into O(1)

* use Alt for adding new points

* fix adding and deleting a point with rotation

* disable resize handlers & bounding box on line edit

Co-authored-by: daishi <daishi@axlight.com>
2020-06-01 11:35:44 +02:00
David Luzar
f413bab3de
Fix group element removing (#1676) 2020-05-30 13:48:57 -07:00
Aakansha Doshi
17e9cc4506
Some cleanup in App.tsx (#1681) 2020-05-30 15:26:17 +02:00
Aakansha Doshi
fa359034c5
scroll the closest element to center (#1670)
Co-authored-by: Sanghyeon Lee <yongdamsh@gmail.com>
2020-05-30 14:02:32 +02:00
David Luzar
44a88d2d58
Rewrite restore to guard against missing migrations (#1664) 2020-05-28 02:41:34 -07:00
David Luzar
5327e8a3dc
fix language change not rerendering ui (#1638) 2020-05-27 16:46:11 +02:00
David Luzar
63c10743fb
split font into fontSize and fontFamily (#1635) 2020-05-27 15:14:50 +02:00
Pete Hunt
61e5b66dac
Group/ungroup (#1648)
Co-authored-by: dwelle <luzar.david@gmail.com>
2020-05-26 13:07:46 -07:00
Aakansha Doshi
5252726307
dynamically import socket.io-client when needed (#1631) 2020-05-26 20:51:03 +02:00
David Luzar
d2ae18995c
add history.shouldCreateEntry resolver (#1622) 2020-05-22 22:26:59 -07:00
Lipis
c427aa3cce
Prefer arrow functions and callbacks (#1210) 2020-05-20 15:21:37 +02:00
fujimoto kyosuke
afbfe2b8b1
Alt should be labeled as Option on Mac (#1602) 2020-05-14 16:51:52 -07:00
David Luzar
39c56a4c01
implement stroke style (#1571) 2020-05-14 17:04:33 +02:00
David Luzar
828c9c4d65
use commitToHistory prop for handling draw history (#1595) 2020-05-14 14:51:33 +02:00
fujimoto kyosuke
c32640d174
Fix free draw to allow undo (#1594) 2020-05-14 13:32:10 +01:00
Kostas Bariotis
9ec43d2626
Add free draw mode (#1570) 2020-05-12 21:10:11 +02:00
David Luzar
a90ca5eb84
don't use unicode characters for shortcut help (#1565)
* don't use unicode characters for shortcut help

* use option instead of alt

* make shortcut replacement case-insensitive

* improve shortcut dialog layout
2020-05-11 01:29:35 +03:00
Daishi Kato
394237728f
Refactor: resize two-point lines/arrows (#1568) 2020-05-10 17:41:36 +02:00