Commit Graph
72 Commits
Author SHA1 Message Date
Christopher ChedeauandGitHub f91b708abb Revert "Shift drag to add to selection (#350)" (#352)
This reverts commit ce467f7b65.
2020-01-12 12:08:18 -08:00
Christopher ChedeauandGitHub bc909b76da Move copy paste handler to document (#334)
Hopefully it should resolve the copy pasting issues

Fixes #249
2020-01-11 21:39:16 -08:00
Christopher ChedeauandGitHub aad6e8f434 Reset to selection after creating a text (#333)
Fixes #252

Test plan:
- Click on text icon
- Click anywhere to start entering text
- Add a letter
- Make sure the cursor is selection and not text
- Click anywhere else, make sure it completes the text and not create a new one
2020-01-11 21:00:55 -08:00
Christopher ChedeauandGitHub 44657efe71 Fix undoOnce (#332)
I just pasted @enzoferey's implementation and it fixed the bug reported by @dwelle

Fixes #307
2020-01-11 20:45:56 -08:00
Christopher ChedeauandGitHub dd2a7eb597 Fix copy-paste on input (#331)
If the input is active, we shouldn't override copy paste behavior
2020-01-11 20:41:47 -08:00
Christopher ChedeauandGitHub d45f48e60f Set shape background to be transparent by default (#330)
Also makes "Clear canvas" reset the entire app state
2020-01-11 20:34:21 -08:00
Christopher ChedeauandGitHub 3db7d69849 Debounce localstorage save (#328)
I profiled dragging and it looks like it takes ~3ms to save to localStorage a smallish scene and we're doing it twice per mousemove. Let's debounce so we don't pay that cost on every mouse move.

Stole the implementation from #220 which got reverted.
2020-01-11 20:15:41 -08:00
Christopher ChedeauandGitHub c745fd4e5e Prevent cmd-r from selecting rectangle (#327)
I keep adding empty rectangles because I reload with cmd-r which enables rectangle :p Let's only make the shortcut work if there's no modifier enabled
2020-01-11 19:42:34 -08:00
Christopher ChedeauandGitHub 407f00bbd5 Fix alt-duplicate (#326)
We need to unselect all the previous elements and select all the new ones. Also made sure that the shape is regenerated when the element is duplicated
2020-01-11 19:35:06 -08:00
Christopher ChedeauandGitHub 8785bef523 Support transparent background + inline picker (#325)
Unfortunately, react-color has a bug where transparent color doesn't trigger onChange. I've been annoyed by the huge dependency anyway so decided to take the generated html (which is awesome) and reimplement a specific component for it.

I also made sure that we don't actually render anything when the background is transparent on rough (I looked at the generated path and made sure it didn't have the commands for the background)
2020-01-11 19:10:41 -08:00
Christopher ChedeauandGitHub 157f0eae0c Export to canvas only selected elements (#323)
Fixes #308
2020-01-11 16:15:26 -08:00
Christopher ChedeauandGitHub 9fa69448e4 Remove Delete from panel (#322)
Now that we have context menu, we don't need it there
2020-01-11 16:11:21 -08:00
Christopher ChedeauandGitHub 5bdd0a35f6 Fix cmd-a drawing arrows (#321)
We need to quit if we have either elements OR appState, not both.
2020-01-11 16:06:25 -08:00
Christopher ChedeauandGitHub 1bf18fe4ed Tweak context menu style (#320)
- Move the context menu right next to the mouse so it's not so far away. But 1px out so that nothing is selected until you move your mouse
- Change the colors to be closer to the macos one. Unfortunately, macos has a 0.5px border that I'm not able to reproduce without some annoying hacks, 1px it'll be.
2020-01-11 15:59:42 -08:00
Christopher ChedeauandGitHub b481a29024 Remove console.log (#317) 2020-01-11 15:21:24 -08:00
Christopher ChedeauandGitHub 6399b1f318 Remove zindex options from panel (#315)
Now that they are in the context menu, we don't need to have them in the panel anymore.

Fixes #242
2020-01-11 14:58:11 -08:00
Christopher ChedeauandGitHub 2553d10d34 Yet another awesome testimonial (#282) 2020-01-08 20:49:42 -08:00
Christopher ChedeauandGitHub 77400c7b70 One more testimonial (#281) 2020-01-08 19:58:19 -08:00
Christopher ChedeauandGitHub 556843d9a2 Adding open collective sponsor (#275)
I just created an open collective for the project.
2020-01-08 13:04:13 -08:00
Christopher ChedeauandGitHub f2665408fc Revert "Wysiwyg text (#200)" (#225)
This reverts commit abbc04df0e.
2020-01-06 19:50:37 -08:00
Christopher ChedeauandGitHub 8a91f4fe7b One more testimonial (#221) 2020-01-06 13:57:04 -08:00
Christopher ChedeauandGitHub 3bbcb9cbdc Improve Color Picker *2 (#195) 2020-01-05 19:57:50 -08:00
Christopher ChedeauandGitHub 23cd62d148 Improve selection view (#192) 2020-01-05 19:11:35 -08:00
Christopher ChedeauandGitHub fd6b5024c7 Reorganize menu (#178) 2020-01-05 14:45:16 -08:00
Christopher ChedeauandGitHub 6f33d72e35 Add MIT License (#176)
I have no idea if previous people have to agree or what but let’s put a MIT license in.
2020-01-05 13:09:29 -08:00
Christopher ChedeauandGitHub 06b77326bf One more testimonial (#162) 2020-01-05 10:09:36 -08:00
Christopher ChedeauandGitHub 3605250426 Move octocat to the front (#160) 2020-01-05 09:58:47 -08:00
Christopher ChedeauandGitHub b24d1423a5 Tweak README (#158)
- Add first testimonial
- Rename "getting started" to "run the code"
- Added zwibbler shoutout
2020-01-05 09:54:54 -08:00
Christopher ChedeauandGitHub 85fe9f85fb Fix missing mouseup (#144) 2020-01-04 18:36:49 -08:00
Christopher ChedeauandGitHub 9e5c5daf64 Cmd-Z (#141) 2020-01-04 16:59:59 -08:00
Christopher ChedeauandGitHub 4ca8f65887 Use device pixel ratio (#139)
* Use device pixel ratio

* Update index.tsx
2020-01-04 16:08:35 -08:00
Christopher ChedeauandGitHub 3172109050 Inline font-awesome icons (#134) 2020-01-04 12:47:12 -08:00
Christopher ChedeauandGitHub 60b06dab73 Remove manifest.json (#131) 2020-01-04 12:19:39 -08:00
Christopher ChedeauandGitHub bd86f819df Prevent re-assignment of elements (#121) 2020-01-04 10:48:23 -08:00
Christopher ChedeauandGitHub 25aabdc4d1 Fix hit testing (#119) 2020-01-04 10:19:18 -08:00
Christopher ChedeauandGitHub 4886065443 Wire up forward (#101)
* Wire up forward

* Match words with Keynote/Powerpoint
2020-01-03 21:46:49 -08:00
Christopher ChedeauandGitHub 6b8d2970ac Add support for forward (#100) 2020-01-03 21:38:48 -08:00
Christopher ChedeauandGitHub 0d5272720f Send to back (#98) 2020-01-03 21:03:25 -08:00
Christopher ChedeauandGitHub 66938ae5c6 Update on resize (#94)
Fixes #88
2020-01-03 18:35:14 -08:00
Christopher ChedeauandGitHub 8605af2b54 Fix key warning (#93) 2020-01-03 18:32:23 -08:00
Christopher Chedeau c077403eec Generate new seed on paste 2020-01-03 18:29:46 -08:00
Christopher ChedeauandGitHub aad99b3047 Update README.md 2020-01-03 18:19:58 -08:00
Christopher ChedeauandGitHub 85cd2f114a Add github corner (#90) 2020-01-03 18:16:27 -08:00
Christopher ChedeauandGitHub 929efa5e2c Distance between point and ellipsis (#92) 2020-01-03 18:16:16 -08:00
Christopher ChedeauandGitHub c027ddc134 Add analytics tag (#89) 2020-01-03 15:47:15 -08:00
Christopher ChedeauandGitHub b18a0efe2c Seed (#73) 2020-01-03 12:33:52 -08:00
Christopher ChedeauandGitHub a5b0e192b4 Remove drawScene (#58) 2020-01-02 19:47:32 -08:00
Christopher ChedeauandGitHub 4c94976527 Random fixes (#57) 2020-01-02 18:20:08 -08:00
Christopher ChedeauandGitHub 3b919f3235 Cmd-A to select everything (#51) 2020-01-02 14:42:53 -08:00
Christopher ChedeauandGitHub 278fc11d22 Better selection click detection (#50) 2020-01-02 14:33:45 -08:00
Christopher ChedeauandGitHub 8a43ed691d Handle escape keybinding (#49) 2020-01-02 14:10:32 -08:00
Christopher ChedeauandGitHub 0d75b78374 Path-dependent hit test (#48)
* Hit test

* Hit test

* Hit test
2020-01-02 13:47:50 -08:00
Christopher ChedeauandGitHub b6c30c0550 Copy paste (#44)
* Copy Paste

* Copy paste
2020-01-02 12:49:06 -08:00
Christopher Chedeau 44ff545219 Fix text height 2020-01-01 22:15:27 -08:00
Christopher Chedeau afe6331c61 Reset selection when adding text 2020-01-01 22:09:12 -08:00
Christopher Chedeau ee7dc953bf Fix clearRect for [0, 0.5] 2020-01-01 21:51:13 -08:00
Christopher Chedeau 457800caa3 Mouse move tracked outside window! 2020-01-01 21:46:42 -08:00
Christopher Chedeau 9aaaa24426 Also for text 2020-01-01 21:13:01 -08:00
Christopher Chedeau 2fa00f39fc Automatically select last inserted element 2020-01-01 21:10:56 -08:00
Christopher Chedeau c26d04e162 Don't write null when cancelling text 2020-01-01 21:03:44 -08:00
Christopher Chedeau ab84b5a048 Go to selection mode after adding a shape 2020-01-01 21:01:40 -08:00
Christopher Chedeau f8873dd56b Do not regenerate shapes when moving 2020-01-01 20:56:18 -08:00
Christopher Chedeau bd515f7e50 Real 1px lines 2020-01-01 20:21:47 -08:00
Christopher Chedeau 4076cf003f Proper fix for negative width 2020-01-01 20:13:06 -08:00
Christopher Chedeau 3c8eb862f5 Move with arrow keys 2020-01-01 20:02:09 -08:00
Christopher Chedeau 48d9147d87 Fix selection from right to left 2020-01-01 19:53:22 -08:00
Christopher Chedeau aeb11989e3 Fix text selection 2020-01-01 18:12:49 -08:00
Christopher Chedeau 3769c4af00 Handle backspace 2020-01-01 17:58:28 -08:00
Christopher Chedeau 9dc19dde1d Proper text sizing 2020-01-01 17:51:14 -08:00
Christopher ChedeauandGitHub 47e626f510 Add selection (#1) 2020-01-01 17:12:42 -08:00
Christopher Chedeau 6278cd9366 Initial commit 2020-01-01 17:04:47 -08:00
Christopher ChedeauandGitHub ec23829fce Initial commit 2020-01-01 17:04:44 -08:00