Wykres commitów

363 Commity (9c3424a5fc6f8fb247f53c927b030938677109ea)

Autor SHA1 Wiadomość Data
Steve Ruiz 97c2b8c4c6
Fix erasing bug (#490)
* Update EraseSession.ts

* Update EraseSession.ts
2022-01-06 20:22:49 +00:00
Steve Ruiz a793fadf74 Update ArrowSession.ts 2022-01-06 14:04:17 +00:00
Steve Ruiz b1697b2ca7 Fix context menu, fix blur issue 2022-01-06 14:00:23 +00:00
Steve Ruiz 31a1a8b5ae Fix bug with missing draw shape after undo 2022-01-06 13:36:40 +00:00
Steve Ruiz deadc70030 fix pointer error 2022-01-06 13:23:45 +00:00
Steve Ruiz 32d96aef94 Merge branch 'main' of https://github.com/tldraw/tldraw 2022-01-06 10:47:36 +00:00
Steve Ruiz 5c33fbd89c bug fixes 2022-01-06 10:45:11 +00:00
Steve Ruiz 24ece6b38a
Update groupShapes.ts (#488) 2022-01-06 07:35:32 +00:00
Jesco Wüster 0271ccccf8
Enable panning for all tools (#484)
* Enable panning for DrawTool

* move camera panning logic to TlDrawApp

* fix: disable shape button on keyboard pan

* ensure middle wheel panning returns to idle globally

* prevent flicker during mouseup while spacePanning

* Use boolean flags for force panning

* add middle mouse button

* Fix logic

* Fix toolbar re-selecting

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2022-01-05 14:47:07 +00:00
Steve Ruiz d00d443492
Add shift+click to draw straight lines between points (#478)
* Add shift+click to draw straight lines between points

* Add points to previous shape

* undo/redo fixes

* Fix bug with non-draw shapes

* Update drawHelpers.ts
2022-01-03 09:49:34 +00:00
Steve Ruiz 97ba1505ab
Fix editing bug (#480) 2022-01-03 09:39:27 +00:00
Tony Li e7a2f5d6d4
added NaN check on pinch event (#476) 2021-12-31 09:42:56 +00:00
Steve Ruiz 59e5a446c9
Copies over browser-fs-access src :( (#470) 2021-12-28 14:29:55 +00:00
Steve Ruiz d0fd712e5e
[improvement] labels (#467)
* Improve appearance of arrow shape labels, set label text color to match stroke

* fix svg copy fonts for text, labels

* Reduce opacity effect of scaled arrow label, update font in export, adds command+enter to finish text
2021-12-28 11:23:17 +00:00
Steve Ruiz d7a697647b
[feature] Labels for shapes (#462)
* Adds generic text label

* Clean up text label / text util

* labels for ellipse and triangles

* Add arrow label

* Update filesystem.ts

* Double click bend to edit label, fix mask location

* refactor arrowutil

* fix arrow bindings

* Rename text to label, add labelPoint

* Fix arrow binding, styles on text labels, double click bounds edge to edit label

* Update ArrowSession.ts

* Update StyleMenu.tsx

* set version
2021-12-27 19:21:30 +00:00
Steve Ruiz e48f0c1794 Update migrate.ts 2021-12-27 18:51:20 +00:00
Steve Ruiz 7c02a6d514 Merge branch 'main' of https://github.com/tldraw/tldraw 2021-12-27 18:50:33 +00:00
Steve Ruiz d355be10d6 Improve appearance of ellipses/videos, fix bug 2021-12-27 18:49:54 +00:00
Steve Ruiz d60bb5c6ee
Fix bug where reloading could clear the state (#465)
* Fix bug where reloading could clear the state

* fix test

* Fix image and video positions
2021-12-27 18:44:47 +00:00
Steve Ruiz 297486bb34 Remove performance modes (for now) 2021-12-27 12:38:30 +00:00
Steve Ruiz 4aa8547a8e
[improvement] performance modes (#463)
* add performance modes to core, sessions

* Update filesystem.ts

* rename TLPerformance to TLPerformanceMode, fix bugs
2021-12-27 12:30:35 +00:00
Steve Ruiz fd2befa305 rename refs 2021-12-25 19:39:20 +00:00
Steve Ruiz 0ed7e55c4c Make core asset types more generic, update docs. 2021-12-25 18:39:50 +00:00
Faraz Shaikh 1c65c031b2
Add Image and Video shapes (#460)
* Added image and video shapes

* Fixed bugs; Added optional onImageUpload callback

* Added id field to onImageUpload

* Added onImageDelete callback for cleanup

* Added firebase storage to multiplayer for media

* Added firebase storage to multiplayer for media

* Silence unnecessary TS errors

* Fixed bugs; Added tests

* Added tests

* Disable images for multiplayer example

* switch to assets in document, rather than on shapes, fix resize, fix sizes

* bump version, add migration for assets table

* Rename onImageUpload

* Add isPlaying state to video (not complete)

* Revert "Add isPlaying state to video (not complete)"

This reverts commit 3dc2ba703f.

* Adds controls when editing video, sync current time when cloning

* Remove unused tools

* avoid duplication in assets

* Remove unused image styles from style menu

* Fix placement of clone buttons

* Fix flag to hide image assets in multiplayer

* move getSizeFromDataUrl to filesystem

* Update VideoUtil.tsx

* Re-center video after it loads

* Add copy and paste support for assets

* Fix bug in state manager, remove unused assets on load, fix indicators

* Add multiplayer with images example

* Update MultiplayerEditor.tsx

* Add images to copy SVG

* tighten up some code around svg export

* Update TldrawApp.spec.ts

* Update useBoundsHandleEvents.tsx

* Reset image size by double clicking bounds

* fix reset size

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2021-12-25 17:06:33 +00:00
Jim Fisher e55d4779f6
Bugfix: "Copy as SVG" should respect childIndex (#455)
* Bugfix: respect childIndex in Copy as SVG

* Try adding test - but why is the test output an empty svg
2021-12-18 20:49:30 +00:00
Steve Ruiz 58b8968f12
[fix] intersection bug (#452)
* Update TLShapeUtil.tsx

* Add tests

* Update tsconfig.json
2021-12-17 16:29:08 +00:00
Jim Fisher 2bc927f68e
Bugfix: 'Copy as SVG' shapes have black fill by default (#449)
* Bugfix: 'Copy as SVG' shapes have black fill by default

* Remove binding hit areas from copied SVG

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2021-12-17 15:23:03 +00:00
Milo Hill 1271070798
Fix changing a setting preventing page content from being replaced (#447)
* Fix setting settings preventing UI from updating

* Add tests for replacePageContent
2021-12-15 21:14:40 +00:00
Steve Ruiz ec203332de Update TldrawApp.ts 2021-12-13 09:08:35 +00:00
Steve Ruiz 693c0c848f Update TldrawApp.ts 2021-12-13 09:07:25 +00:00
Steve Ruiz 91da95de1c remove react-id dep 2021-12-12 21:45:21 +00:00
Steve Ruiz 5e6a4939d1 Removes faulty error boundary from core, removes faulty ID provider from tldraw 2021-12-12 21:44:44 +00:00
Steve Ruiz 0c31c732e8 Update test 2021-12-10 16:07:33 +00:00
Steve Ruiz 45c0febdad fix selection for filled shapes 2021-12-09 22:55:52 +00:00
Steve Ruiz eb234330dd Fix rotation binding for triangles 2021-12-09 22:38:23 +00:00
Elizabeth Louie c5124b160e
add triangle tool (#433)
* add triangle tool

* fix keyboard shortcuts

* cleaned code

* Add binding, better indicator, bounds

* Fix tests

* Refactor getBindingPoint, binding distances, add comments to getBindingPoint

* Update TextUtil.spec.tsx.snap

* fix intersection math

* fix ellipse indicator

* Update EllipseUtil.tsx

* Update BrushSession.spec.ts

* Add draw style to triangle

* improve strokes

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2021-12-09 22:29:09 +00:00
Steve Ruiz 86c651764c
Filled shapes may be selected from the center (#440) 2021-12-08 14:20:22 +00:00
Steve Ruiz 52ae47371d
[improvement] Select unfilled shapes by clicking on their stroke (#438)
* removes touch events from middle of shapes

* Improve ellipse

* selectable stroke when not selected, fill when selected

* Update BrushSession.spec.ts

* Fix test
2021-12-07 20:48:56 +00:00
megnakokkalera c67c0871ff
Fix/undo on menu open (#436)
* fix for undo button on menu open

* Change toggle to set, add option for keyboard events

* Update .gitignore

* Update .gitignore

* Remove isStyleOpen

* Remove isStyleOpen

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2021-12-06 18:23:53 +00:00
Steve Ruiz 0039dd2e66
Restore onPersist (#435) 2021-12-04 14:51:40 +00:00
Siddhartha Varma 5fe09733af
fix: update ungroup shortcut (#434) 2021-12-04 10:42:45 +00:00
Braden 522baf5b61
[fix] account for "draft" shapes when preserving selection state during replacePageContent (#427)
* account for "virtual" shapes when preserving appState

* rewrite merge logic

* More work on multiplayer

* Update TldrawApp.ts

* Improve logic around when to replace page content

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2021-12-02 12:49:07 +00:00
Steve Ruiz 33acf03004
[fix] multiplayer (sorta) (#426)
* Fix multiplayer

* Update TldrawApp.ts

* Update TldrawApp.ts

* Update TldrawApp.ts
2021-12-01 22:31:19 +00:00
Steve Ruiz 0334ac0f30
Fix alt zoom (#424) 2021-12-01 14:25:56 +00:00
Steve Ruiz e0100949a5
Update EraseSession.ts (#423) 2021-12-01 14:08:27 +00:00
Yao Wang ed8e3f252d
fix the wrong spelling (#419) 2021-12-01 13:48:51 +00:00
Braden 17c34b2d7d
Fix iteration over deleted bindings during page change (#421) 2021-12-01 13:48:37 +00:00
Yao Wang 2c28012839
fix(paste): do not warn in production (#409)
- when paste the content from clipboard, if the content is not JSON, the `JSON.parse` parse error will be thrown. The info should not be in production build.

Closes #400
2021-11-28 22:00:01 +00:00
Eivind Ingebrigtsen ac648da2c5
⌨️ Changing keyboard shortcuts for pen and oval (#407) 2021-11-28 14:54:51 +00:00
Francois Laberge a1dd79ce35
Fix Text Editing Issues in VS Code Extension (#399)
* Temp change so I can create a PR

* Have select all,copy/paste/cut, and  undo/redo working for text/sticky shapes in VS Code extension

* cleanup

* removed some semi colons

* Ran prettier

* More cleanup

* Adds stopPropagation for native context menu

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2021-11-28 14:53:35 +00:00