546 Commits

Author SHA1 Message Date
Michal Srb
5d7020cce6
Refactoring in pointer down event handler ()
* 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 () 2020-07-08 22:55:26 +02:00
Aakansha Doshi
9351b2821c
feat: add width, height as props to App.tsx () 2020-07-07 17:10:39 +02:00
David Luzar
b1261eea70
duplicate point on cmd+d () 2020-07-07 13:53:44 +02:00
Mehedi Hassan
cc52ea4ac2
Add support for long press to context menu on iOS ()
* 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
David Luzar
cd87bd6901
do not center text when not applicable () 2020-06-25 21:21:27 +02:00
Daishi Kato
9c89504b6f
fix: start dragging grouped elements ()
Co-authored-by: dwelle <luzar.david@gmail.com>
2020-06-24 13:38:42 +02:00
Daishi Kato
baa8fb6c14
grid support (1st iteration) ()
Co-authored-by: dwelle <luzar.david@gmail.com>
2020-06-23 17:24:52 +02:00
Aakansha Doshi
60973f6dc5
rename container class to excalidraw and move css from index.html to app.css ()
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 ()
Co-authored-by: David Luzar <luzar.david@gmail.com>
2020-06-08 11:25:20 +02:00
Pete Hunt
f7c4efbd35
Excalicharts MVP ()
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 () 2020-06-02 19:41:40 +03:00
David Luzar
14a66956d7
Implement line editing ()
* 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 () 2020-05-30 13:48:57 -07:00
Aakansha Doshi
17e9cc4506
Some cleanup in App.tsx () 2020-05-30 15:26:17 +02:00
Aakansha Doshi
fa359034c5
scroll the closest element to center ()
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 () 2020-05-28 02:41:34 -07:00
David Luzar
5327e8a3dc
fix language change not rerendering ui () 2020-05-27 16:46:11 +02:00
David Luzar
63c10743fb
split font into fontSize and fontFamily () 2020-05-27 15:14:50 +02:00
Pete Hunt
61e5b66dac
Group/ungroup ()
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 () 2020-05-26 20:51:03 +02:00
David Luzar
d2ae18995c
add history.shouldCreateEntry resolver () 2020-05-22 22:26:59 -07:00
Lipis
c427aa3cce
Prefer arrow functions and callbacks () 2020-05-20 15:21:37 +02:00
David Luzar
39c56a4c01
implement stroke style () 2020-05-14 17:04:33 +02:00
David Luzar
828c9c4d65
use commitToHistory prop for handling draw history () 2020-05-14 14:51:33 +02:00
fujimoto kyosuke
c32640d174
Fix free draw to allow undo () 2020-05-14 13:32:10 +01:00
Kostas Bariotis
9ec43d2626
Add free draw mode () 2020-05-12 21:10:11 +02:00
Daishi Kato
394237728f
Refactor: resize two-point lines/arrows () 2020-05-10 17:41:36 +02:00
Daishi Kato
3b1d6910aa
fix resizing: dynamic pointer offset for better UX () 2020-05-09 10:57:00 +02:00
David Luzar
8c8458ceb0
fix incorrect font rendered on late load () 2020-05-08 10:42:51 +02:00
Pete Hunt
4696c9ee0e
Syncing optimizations ()
* Syncing optimizations

* Add comment
2020-05-07 14:13:18 -07:00
David Luzar
4aa1784ba3
fix horizontal scroll via shift+wheel on mac () 2020-05-02 13:15:28 -07:00
David Luzar
b7a37c157b
scroll horizontally on shift-scroll () 2020-04-30 13:34:38 -07:00
Kent Beck
dd1dfc5950
One more socket listener moved to Portal ()
* room-user-change listener moved to Portal

* Eliminate useless checks

* Update src/components/App.tsx

Co-Authored-By: Lipis <lipiridis@gmail.com>

Co-authored-by: Lipis <lipiridis@gmail.com>
2020-04-28 09:49:00 -07:00
Kent Beck
0baabff41b
Begin moving socket listeners to Portal () 2020-04-27 10:56:08 -07:00
Aakansha Doshi
1866074c07
Add Zen mode for distraction free drawing () 2020-04-25 15:13:02 +02:00
José Quinto
ed6fb60337
resize elements from center point ()
* add hint & support multi-line hints

* resize from center point using the new resize maths

* resize with origin element when lifting alt key

* add readonly to elementOriginPosition

* add setResizeWithCenterKeyLifted

* isResizeFromCenter logic

* offsetX and offsetY

* simplify equations

* creating element from center point

* lint

* lint

* lint

* remove revert on key up logic

Co-authored-by: dwelle <luzar.david@gmail.com>
Co-authored-by: daishi <daishi@axlight.com>
2020-04-22 17:57:17 +02:00
Ed Bentley
9b7a743e8b
Fix bug: Undo multi element ()
* Add failing test

* Fix multi element undo

* Update snapshots
2020-04-20 15:05:39 +02:00
Aakansha Doshi
a18342b5b5
Refactor LayerUI ()
* chore(gitignore): add .idea to gitignore

* refactor(layerui): pass named function to react.memo so that in dev tools the name shows up

This makes debugging easier as well

* refactor(layerui): break the functional component into multiple render methods
2020-04-17 22:24:19 +02:00
David Luzar
83199164ae
don't prevent select-element devTools action () 2020-04-17 01:18:45 +03:00
David Luzar
d998a190df
persist pointerDown event () 2020-04-14 12:33:57 +02:00
dependabot-preview[bot]
7df16c1b1d
Bump prettier from 2.0.3 to 2.0.4 ()
* Bump prettier from 2.0.3 to 2.0.4

Bumps [prettier](https://github.com/prettier/prettier) from 2.0.3 to 2.0.4.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.0.3...2.0.4)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* format

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Panayiotis Lipiridis <lipiridis@gmail.com>
2020-04-14 12:30:58 +03:00
Timur Khazamov
4228c2e094
[POC] use serviceWorker from create-react-app ()
* Service worker with toast notifications

* Update CSP to allow fetches from now.sh

* Fixed clearing timers

* rounded icon for pwa ()

* rounded icon for pwa

* cirle pwa app icon

* fix fonts caching

* fix app

* fix css import

* Updated csp tp inlcude worker-src: self

* add worker CSP rule

* use square icon

Co-authored-by: Timur Khazamov <t1mmaas@skbkontur.ru>
Co-authored-by: Faustino Kialungila <Faustino.kialungila@gmail.com>
Co-authored-by: kbariotis <konmpar@gmail.com>
2020-04-13 16:08:39 +02:00
Jérémie Pardou-Piquemal
e158dbc45a
Prevent next paste on middle clic with linux () 2020-04-13 16:10:26 +03:00
David Luzar
6771b505ad
rewrite wysiwyg property updating ()
* rewrite wysiwyg property updating

* reuse existing class

* fix case of focus being stolen by other UIs

* revert mistake csp removal

* ensure we don't run cleanup twice

* fix opacity updating

* add shape actions menu class to constants
2020-04-12 15:57:57 +02:00
Aakansha Doshi
227ff60909
refactor(app.tsx): move Portal to new file and some refactoring () 2020-04-12 12:54:52 +02:00
Aakansha Doshi
e98fba38be
refactor(app.tsx): use constants instead of hard coded strings for better readablility ()
don't use inline function as it will create a new refrence everytime
2020-04-11 17:42:02 -07:00
Roxana Chiorean
d902bbd618
Fix flickering mouse tracking when using two touches on mobile () 2020-04-11 15:26:27 -07:00
Kostas Bariotis
2adae4132b
Global username instead of per room ()
* global username

* remove string interpolation

Co-Authored-By: Lipis <lipiridis@gmail.com>

* remove string interpolation

Co-Authored-By: Lipis <lipiridis@gmail.com>

* remove backwards compat

Co-authored-by: Lipis <lipiridis@gmail.com>
2020-04-11 21:23:12 +01:00
Kostas Bariotis
7b3816d0d3
Store username for every room ()
* store username for every room

* add missing fun
2020-04-11 19:13:10 +03:00