Commit Graph

507 Commits (4b8b9965c211a09179ae08a0052460c7462c76df)
 

Author SHA1 Message Date
David Luzar 4b8b9965c2
fix early return from renderScene (#815) 5 years ago
Lipis 4e3a2f9e3b
New Crowdin translations (#813)
* New translations en.json (German)

* New translations en.json (German)

* New translations en.json (German)
5 years ago
Lipis 165ce17590
New Crowdin translations (#811)
* New translations en.json (French)

* New translations en.json (German)

* New translations en.json (Norwegian)

* New translations en.json (Polish)

* New translations en.json (Portuguese)

* New translations en.json (Russian)

* New translations en.json (Spanish)

* New translations en.json (Turkish)

* New translations en.json (Polish)
5 years ago
David Luzar 80a49e9611
improve error handling & map stack trace (#809)
* improve error handling & map stack trace

* log error message and tweak

* support logging multiple errors

* move dynamic import inside try/catch
5 years ago
Takumi a613d02147
Add cursor pointer style to hidden radio buttons (#810)
* Add cursor pointer style to hidden radio buttons

* ensure hidden input buttons don't interact with mouse

Co-authored-by: David Luzar <luzar.david@gmail.com>
5 years ago
Oren Me 07336bb168
feat: add reset zoom button (#777)
* feat: add reset zoom button

Add zoom reset button.
Button is shown only when zoom scale is different from 1

* change reset zoom icon

* always show zoom reset

* fix typo
5 years ago
Jed Fox 74add8661a
Fix error on export (#808) 5 years ago
Jed Fox 4e489bfb6d
Fix zoom being set to NaN (#807)
* Fix zoom being set to NaN

* recover zoom default value on restore if invalid

Co-authored-by: David Luzar <luzar.david@gmail.com>
5 years ago
Lipis d342cae2ae
New Crowdin translations (#806)
* New translations en.json (Polish)

* New translations en.json (Polish)
5 years ago
lissitz e80ab1c8a2
Don't render bounding box for multi-point lines during creation (#799)
* don't render bounding box for multi-point lines during creation

* force LayerUI rerender after creating a new point

Force LayerUI rerender after creating a new point so that the mobile UI
updates and the Done button is visible.

* don't select multiElement on confirm is locked

Co-authored-by: David Luzar <luzar.david@gmail.com>
5 years ago
Jed Fox 43236bed68
Fix error with contentEditable (#803) 5 years ago
Thomas Steiner 277eeb47cc
Update expiring origin trial token (#800) 5 years ago
Lipis 09fa56335e
New Crowdin translations (#796) 5 years ago
Lipis 7e3ca1b309 Update Crowdin configuration file 5 years ago
Jed Fox 0fd3fb4b5b
More mobile tweaks (#790)
* Disable text selection

* Set content-editable=plaintext-only to disable Touch Bar formatting buttons

* Enlarge resize handle tap targets for pen/touch

* Make the lock button a button in mobile mode

* Use icons instead of Unicode characters; add an alternate toolbar for creating multipoint lines

* Allow buttons to hide themselves

* Fix heuristic for showing shape actions

* Refactor icons

* Fix label for edit button

* Switch edit button icon

* Remove lock button on mobile

* Add language selector on mobile

* Fix showing edit button on mobile

* Fix showing edit button on mobile, part 2

* Fix handle touch regions

* Fix scroll-back button position

* Allow using the text tool on a text object to start editing it

* Fix deletion of last point in line
5 years ago
Lipis 949c3841ea
Show hint under toolbar (#783) 5 years ago
İsmail Namdar 626c99939e
add tr localization (#789) 5 years ago
Jed Fox ab176937e6
Add touch support (#788)
* Add touch support

* Mock media query

* Mock media query pt 2

* Fix tests

* Allow installing as an app on iOS

* Fix type error

* Math.hypot

* delete and finalize buttons, hint viewer

* skip failing tests

* skip the rest of the failing tests

* Hide the selected shape actions when nothing is selected

* Don’t go into mobile view on short-but-wide viewports

* lol
5 years ago
Lipis c2855e2cb8
Add new favicon (#786) 5 years ago
Jed Fox 7a7a73b78d
Initial support for mobile devices (#787)
* Initial support for mobile devices

No editing yet, but UI looks nice and you can open the canvas menu

* Add support for editing shape color, etc

* Allow the mobile menus to cover the shape selector

* Hopefully fix test error

* Fix touch on canvas

* Fix safe area handling & remove unused Island
5 years ago
David Luzar 9439908b92
use a better cloning algorithm (#753)
* use a better cloning algorithm

* Revert "use a better cloning algorithm"

This reverts commit 7279262129.

* implement custom cloning algorithm

* add tests

* refactor

* don't copy canvas & ignore canvas in related ops

* fix tests
5 years ago
Christopher Chedeau 5256096d76
Fast & Furious (#655)
* [WIP] Fast & Furious

* ensure we translate before scaling

* implement canvas caching for rest of elements

* remove unnecessary ts-ignore

* fix for devicePixelRatio

* initialize missing element props on restore

* factor out canvas padding

* remove unnecessary filtering

* simplify renderElement

* regenerate canvas on prop changes

* revert swapping shape resetting with canvas

* fix blurry rendering

* apply devicePixelRatio when clearing canvas

* improve blurriness; fix arrow canvas offset

* revert canvas clearing changes in anticipation of merge

* normalize scrollX/Y on update

* fix getDerivedStateFromProps

* swap derivedState for type brands

* tweak types

* remove renderScene offsets

* move selection element translations to renderElement

* dry out canvas zoom transformations

* fix padding offset

* Render cached canvas based on the zoom level

Co-authored-by: David Luzar <luzar.david@gmail.com>
Co-authored-by: Preet <833927+pshihn@users.noreply.github.com>
5 years ago
dependabot-preview[bot] d39c7d4421
Bump react-scripts from 3.3.1 to 3.4.0 (#773)
Bumps [react-scripts](https://github.com/facebook/create-react-app/tree/HEAD/packages/react-scripts) from 3.3.1 to 3.4.0.
- [Release notes](https://github.com/facebook/create-react-app/releases)
- [Changelog](https://github.com/facebook/create-react-app/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/create-react-app/commits/react-scripts@3.4.0/packages/react-scripts)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
5 years ago
Sosuke Suzuki 2bb95f0651
Modify to avoid to blur while composing (#775) 5 years ago
dependabot-preview[bot] c4dbb7ca45
Bump husky from 4.2.2 to 4.2.3 (#774)
Bumps [husky](https://github.com/typicode/husky) from 4.2.2 to 4.2.3.
- [Release notes](https://github.com/typicode/husky/releases)
- [Changelog](https://github.com/typicode/husky/blob/master/CHANGELOG.md)
- [Commits](https://github.com/typicode/husky/compare/v4.2.2...v4.2.3)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
5 years ago
Enzo Ferey 6ebd41734f
Resize handler detection should not be active when moving multip… (#767)
* Fix bug.

* Implement `getSelectedElements`.

* Explicit condition.

* Respect variable naming.

* Keep state consistent.

* Use `isSomeElementSelected` abstraction.

* Missing ones.
5 years ago
Timur Khazamov ad72946131
Shortcuts to zoom in/out and to reset zoom (#770)
* Shortcuts to zoom in/out and to reset zoom

* add support for numerical keys

* Fixed Firefox compatibility

Co-authored-by: David Luzar <luzar.david@gmail.com>
5 years ago
David Luzar 2d22ffda49
fix wheel zoom step (#771) 5 years ago
Timur Khazamov eee961d65f
Use meta key + wheel to zoom in/out (#769) 5 years ago
Szymon Pajka 360864ef3d
Add missing Polish translations (#766) 5 years ago
Enzo Ferey c7ff4c2ed6
Canvas zooming (#716)
* Zoom icons.

* Actions.

* Min zoom of 0 does not make sense.

* Zoom logic.

* Modify how zoom affects selection rendering.

* More precise scrollbar dimensions.

* Adjust elements visibility and scrollbars.

* Normalized canvas width and height.

* Apply zoom to resize test.

* [WIP] Zoom using canvas center as an origin.

* Undo zoom on `getScrollBars`.

* WIP: center zoom origin via scroll

* This was wrong for sure.

* Finish scaling using center as origin.

* Almost there.

* Scroll offset should be not part of zoom transforms.

* Better naming.

* Wheel movement should be the same no matter the zoom level.

* Panning movement should be the same no matter the zoom level.

* Fix elements pasting.

* Fix text WYSIWGT.

* Fix scrollbars and visibility.
5 years ago
Christopher Chedeau dd2d7e1a88
Updates on the font (#764)
* Updates on the font

See discussion in #747

Fixes #747

* another update
5 years ago
Thomas Steiner 98c2b26118
Update browser-nativefs dep after repo move (#763)
* Update browser-nativefs dep after repo move

* Bump deps
5 years ago
rubjo 40b54a8780
Update translation: Norwegian Bokmål (#762) 5 years ago
Gasim Gasimzada 7183234895
Write integration tests (#719)
* Scaffold a simple test case for debugging

* Set up Jest environment that works with React

- Install and set up react-testing-library
- "Unignore" roughjs and browser-nativejs transformations
- Separate App component from ReactDOM

* Write first passing test

- Mock canvas
- Remove App file and mount/unmount ReactDOM on import

* Add tests for drag create behavior

* Fix comments in dragCreate

* Pin jest-mock-canvas dependency

* Remove dependency range for testing library

* Add tests for multi point mode and selection element

* Fix all tests due to decrease in updates to canvas when changing tools

* Disable state updates if component is unmounted

- Remove all event listeners
- Disable storing scene in state if component is unmounted

* Add tests for move and element selection

* Merge branch 'master' into add-integration-tests

* Add tests for resizing rectangle

* move unmounted check to syncActionResult method

* Use a custom test renderer instead of default testing-library functions

* Add custom query for selecting tools

* move files around

Co-authored-by: David Luzar <luzar.david@gmail.com>
5 years ago
Gasim Gasimzada ad4ad238ef
Remove invisibly small elements on scene load (#754) 5 years ago
lissitz fa12125db0
fix some element types reset to selection when the lock is active (#746)
* keep arrows and lines selected if locked

* keep element type selected if locked after inserting text

* ensure clicking outside doesn't create new text

* esc should switch to selection even if locked

* reset cursor when creating text via doubleClick

Co-authored-by: David Luzar <luzar.david@gmail.com>
5 years ago
dependabot-preview[bot] 1ec3946ed6 Bump @types/jest from 25.1.1 to 25.1.2 (#750)
Bumps [@types/jest](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jest) from 25.1.1 to 25.1.2.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jest)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
5 years ago
David Luzar 6dd3620dd6 fix cloning element.points (#744) 5 years ago
Christopher Chedeau b64fe9aae4
Update FG_Virgil to support Russian and Greek characters (#720)
* Update FG_Virgil to support Russian and Greek characters

Fixes #469

* more symbols
5 years ago
David Luzar 2a472bb912
ensure duplicateElement does deep copy of points (#742) 5 years ago
David Luzar 389e40900c
z-index button fixes (#738)
* fix svg attributes

* center z-index icons

* remove unnecessary attributes

* differentiate button :active bg

* prevent selection of ToolIcon hints

* emphasize active elem color
5 years ago
wboucher 471ea4a747
Add zindex to panel (#736)
* Add z-index options back to panel

* Add formatting for z-index panel buttons

* make z-index buttons all the same width

* make z-index button spacing even

* use svg icons & translations

* add ui legend

Co-authored-by: David Luzar <luzar.david@gmail.com>
5 years ago
Gasim Gasimzada b09373acf7
Align arrow caps based on bezier curve instead of stored points (#737) 5 years ago
Christopher Chedeau c2a3b67ccc
Fix scrollbar (#735)
The computation was not correct. I'm not really sure how it used to work but it was not taking into account the dimensions of the scene so it was wrong.

The new algorithm is computing the scrollbar such that it's the position of the viewport in relationship to the bounding box of the viewport and all the elements.

Fixes #680
5 years ago
Christopher Chedeau 935a7f58a7
Remove previously loaded scenes (#734)
As mentioned in #724, the current implementation is suboptimal. Let's remove it until we come back with a better design.

Fixes #724
5 years ago
Christopher Chedeau 8d64ec8153
Add lock icon (#733)
Because it looks more secure ;)
5 years ago
Christopher Chedeau e6d03aeeea
End to end encryption description (#731)
* End to end encryption description

This PR updates the url upload description to mention that it is end to end encrypted. I used a very similar message as whatsapp so that it is familar to people.

I also removed the automatic copying and turned the alert into prompt. This should be less awkward than the current implementation.

* capitalize excalidraw

Co-authored-by: David Luzar <luzar.david@gmail.com>
5 years ago
Szymon Pajka f359a1ea1b
Fix grammar problems in Polish translation 🇵🇱🐛 (#730)
* corrected typos
* fixed grammar
5 years ago
David Luzar d79293de06
move footer into layerUI & refactor ActionManager (#729) 5 years ago