Commit graph

316 commits

Author SHA1 Message Date
DD Liu
92ec567887 Fix stroke width showing 0 when the first color of a gradient is transparent. Fix "MIXED" being the secondary gradient color 2020-08-08 02:11:45 -04:00
adroitwhiz
0b16ca16eb
Merge pull request #1197 from adroitwhiz/vector-line-mode-gradient
Don't clear gradient on entering vector line mode
2020-07-29 17:09:07 -04:00
adroitwhiz
92ac312ad8 Rename getRotatedColor to getSecondaryColor
This function is used to generate a "secondary" color for gradients.
It will soon do things other than rotate the hue.
2020-07-29 16:43:21 -04:00
adroitwhiz
a97aee7913 Don't clear gradient on entering vector line mode 2020-07-29 16:41:31 -04:00
adroitwhiz
cca0832f0d Fix zero-width-outline logic
- Set the stroke color to "null" when the width is set to 0
- Properly set the stroke color state when the width is increased from 0
2020-07-28 08:39:49 -04:00
adroitwhiz
98daa5ee5d Gradients in line mode
The UX here isn't the best thing in the world but I think having the
functionality is important judging from the playtest
2020-07-28 08:39:49 -04:00
adroitwhiz
f0b1881fb0 Fix changing gradient strokes to/from null
Hopefully the comments help; the logic is kinda convoluted here
2020-07-28 08:39:49 -04:00
adroitwhiz
696e35582c Add GradientToolsModes for shouldShowGradientTools
This means that gradient tools will also be enabled for the stroke color
indicator even in fill and bitmap modes, but that's okay because the
stroke color indicator will be disabled or hidden in those modes anyway.
2020-07-28 08:39:49 -04:00
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