Commit graph

308 commits

Author SHA1 Message Date
adroitwhiz
6ab7b4c67d Remove unnecessary bitmapMode params 2020-07-28 08:39:49 -04:00
adroitwhiz
a304dea338 Add gradients to bitmap shape tools 2020-07-28 08:39:49 -04:00
adroitwhiz
df1989d0b0 Add gradients to vector shape tools 2020-07-28 08:39:49 -04:00
adroitwhiz
6094953ef4 Wire up stroke gradient controls
* Abstract FillColorIndicator and StrokeColorIndicator to ColorIndicator
* Replace stroke color reducer with stroke style reducer
* Add color style proptype
* Clear stroke gradient in line mode
2020-07-23 05:57:52 -04:00
adroitwhiz
1ecab99cfb Make style-path helpers generic over fill & stroke 2020-07-23 05:54:57 -04:00
adroitwhiz
1017911fd4 color -> style, move selection gradient into it
A "style" refers to something that can fill/stroke a shape.
Currently that's either a solid color or a gradient of some orientation.
The selection gradient type reducer has been removed and folded into the
"fill style" reducer.
2020-07-09 17:52:08 -04:00
adroitwhiz
018958ce7b Combine fill-color and fill-color-2 reducers 2020-07-09 17:13:41 -04:00
DD Liu
8b03c5af54 Set the rotation center of bitmaps with no rotation center to the center of the stage 2020-05-24 22:18:55 -04:00
adroitwhiz
f76a399b83 Add comment on early return if !paper.view 2020-05-18 15:51:58 -04:00
adroitwhiz
3946cdc5f8 Move canvas dimension rounding to recalibrateSize 2020-05-16 03:56:22 -04:00
DD Liu
2cb1f1a62d Merge branch 'develop' into fillSpace 2020-05-14 14:21:35 -04:00
DD Liu
0e20cd0234 fix that zooming from .5 to .333 by scroll wheel is not smooth 2020-05-11 18:42:52 -04:00
apple502j
4d3183a6ab Update sprite when gradient colors are swapped 2020-05-12 02:38:14 +09:00
DD Liu
c6d5d892cf Bring in adroitwhiz's changes 2020-05-06 22:57:11 -04:00
DD Liu
337f12b836 Fill the available space in the costume tab 2020-04-21 18:04:26 -04:00
DD Liu
eda582363a Pass mode through to more selection tools. Correct the mode type of some tools that were misreporting it before. 2020-04-21 13:11:27 -04:00
DD Liu
1eec689935 Fix not resizing the crosshair when switching tabs and coming back to the paint editor 2020-02-13 12:04:28 -05:00
DD Liu
4fe7c0ab8b Revert "Revert "Crosshair""
This reverts commit 999c62ff5c.
2020-02-06 18:11:10 -05:00
Paul Kaplan
999c62ff5c
Revert "Crosshair" 2020-02-06 12:15:59 -05:00
DD Liu
3733fb4148 Style drag crosshair and selection crosshair and add snapping between the two 2020-01-28 12:08:27 -05:00
DD Liu
8d6e25b695
Merge pull request #909 from fsih/fixNoDefault
Fix bitmap sprites opening with no default tool selected
2019-09-23 11:36:44 -04:00
Karishma Chadha
f282b3b96c Fix issue where eyedropper could not be used to set the secondary color in a gradient. 2019-09-20 10:45:28 -07:00
DD Liu
3ca123e603 Add VectorModes 2019-09-20 12:32:24 -04:00
DD Liu
54ce55d2d1 Fix bitmap sprites opening with no default tool selected 2019-09-18 22:22:05 -04:00
Paul Kaplan
73fcbef28d Always use passive: false on touch move drag handler events (#858) 2019-07-15 11:48:20 -04:00
Paul Kaplan
3357ba8954
Merge pull request #854 from paulkaplan/fix-initial-zoom-scrollbars
Make scrollbars show up at initial zoom-to-fit size
2019-06-24 09:25:22 -04:00
Paul Kaplan
fc08becbf3 Only update view bounds if zoomToFit was truthy 2019-06-21 08:56:32 -04:00
Paul Kaplan
abc5b66395 Make scrollbars touch accessible.
The GUI which uses the same getEventXY helpers just wire up both touch and mouse events instead of just mouse events
2019-06-13 11:44:06 -04:00
Paul Kaplan
867935d185 Force an update after zooming to fit to make scrollbars update.
Fixes https://github.com/LLK/scratch-paint/issues/851
2019-06-13 11:38:02 -04:00
Jacco Kulman
b0bdc1eef0
Update scrollable-canvas.jsx
Missing semicolon added
2019-03-12 08:14:05 +01:00
Jacco Kulman
a0edeb7d9c Pan/zoom with tool #401 2019-02-06 12:10:17 +01:00
Paul Kaplan
7f1c0c2a65 Move eyedropper callback into mouseUp to allow dragging the loupe around 2019-01-14 10:19:39 -05:00
Paul Kaplan
13052b967e Fix previousTool=null bug from Sentry 2019-01-14 10:07:06 -05:00
DD Liu
5ae3ade49b
Round stroke caps (#798) 2018-12-14 10:46:37 -05:00
Florrie
934b756032 Make mouse cursor react to what it's hovered over (#762) 2018-12-10 17:42:29 -05:00
DD Liu
badc549fdc
Revert "Revert "Wait for other callbacks before load SVG code"" (#772)
* Add back bitmap jumping fix

* Cancel previous async action if a new one is queued, and move zoomToFit call until after import

* Make bitmap load cancellable too
2018-11-20 14:10:25 -05:00
Paul Kaplan
dd35871076 Revert "Wait for other callbacks before load SVG code (#755)"
This reverts commit 2d277581b1.
2018-11-09 13:01:58 -05:00
DD Liu
2d277581b1
Wait for other callbacks before load SVG code (#755) 2018-11-05 11:03:58 -05:00
DD Liu
c6fb28a69c
Make stroke width 0 when transparent (#695) 2018-09-26 13:08:47 -04:00
DD Liu
4b658c294f
Bitmap select state (#678) 2018-09-17 13:38:16 -04:00
DD Liu
e4883063fe
Handle transparency in bitmap tools (#660) 2018-09-12 13:21:54 -04:00
DD Liu
45018e4f64
Add component will unmount to deactivate to all tools (#657) 2018-09-11 10:35:08 -04:00
DD Liu
6f5c47686d
Rtl text tool (#651) 2018-09-05 17:19:40 -04:00
DD Liu
4be60cae49
Copy and delete work on all objects when none are selected (#634) 2018-09-05 15:34:00 -04:00
DD Liu
97f55cde9e
Fix a bug where we never remove key listeners (#652) 2018-09-05 11:22:45 -04:00
DD Liu
516f6eb714
Zoom to fit (#629)
Note do not merge without GUI change
2018-08-31 12:07:17 -04:00
DD Liu
20a98db397
Break paint-editor.jsx code out into HOCs (#633) 2018-08-30 17:51:11 -04:00
DD Liu
4474ec3aa1
Keyboard shortcuts (#623) 2018-08-29 15:29:13 -04:00
chrisgarrity
97f669423a
Make PaintEditor component rtl aware (#617)
* Make PaintEditor component rtl aware

Fixes the color-picker and any other popover elements.

Adds an RTL prop to the PaintEditor that initializes the `layout` state in redux. Any other components that need to know the layout refer to the state in redux.

I debated whether the state should just be a boolean (true for RTL), or ‘rtl’, ‘ltr’. I went with the latter, but could be convinced that boolean would be better.

I did not add `dir=“rtl”` to the font picker dropdown as all the names are in LTR languages.

Question: Should the sliders reverse direction, and if so, is it worth doing right now when the layout of the color picker may change.

Adding the rtl prop and the `dir=…` to the PaintEditorComponent fixes layout issues in the playground.

* Don’t reverse gradient swatches: the fill colors (and swatch preview) should represent the way the left-right colors will blend when filling a shape.
2018-08-23 19:08:56 -04:00
DD Liu
50de05cee4
Scrollbars (#602) 2018-08-16 16:49:43 -04:00