Commit graph

821 commits

Author SHA1 Message Date
adroitwhiz
2eab5048ac Add hit result to hovered item data 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
f8da455005 Use createGradientObject in applyGradientTypeToSelection 2020-07-23 05:57:01 -04:00
adroitwhiz
1ecab99cfb Make style-path helpers generic over fill & stroke 2020-07-23 05:54:57 -04:00
adroitwhiz
b59af02254
Merge pull request #1006 from adroitwhiz/broad-brush-braces
Improve broad brush handling
2020-07-21 16:07:28 -04:00
DD Liu
f8b94a294f
Merge pull request #1154 from Jacco/fix-1153
ungroup
2020-07-16 22:40:26 -04:00
adroitwhiz
dc430a0111 Fix setting of stroke colors in bitmap mode 2020-07-09 17:52:08 -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
7bab4d5ed8 Abstract color reducer into reducer-generator 2020-07-09 17:13:41 -04:00
adroitwhiz
018958ce7b Combine fill-color and fill-color-2 reducers 2020-07-09 17:13:41 -04:00
adroitwhiz
604b450b5d Simplify fill-color-2 reducer logic
why my brain hurt???
2020-07-09 16:06:04 -04:00
Jacco Kulman
5a154e708e ungroup 2020-06-27 14:41:24 +02:00
DD Liu
2218730c11
Merge pull request #1133 from Jacco/fix-711
Keyboard shortcuts added
2020-06-26 22:02:47 -04:00
DD Liu
b9eefe0b96 Merge branch 'develop' into reshapeCurves 2020-06-23 16:51:35 -04:00
DD Liu
42f74fd3a8 Reshape should hit curves, not strokes 2020-06-23 16:51:09 -04:00
Jacco Kulman
8a886a7b73 Only cut if something is selected 2020-06-21 10:16:16 +02:00
Jacco Kulman
78af17cccf shouldShow checks added 2020-06-21 09:57:27 +02:00
Jacco Kulman
b94a2addf3 Keyboard shortcuts added 2020-06-21 09:52:04 +02:00
adroitwhiz
8d52b31d82
Merge pull request #1119 from adroitwhiz/fix-mixed-color2
Fix color button turning white when it shouldn't
2020-06-19 12:42:44 -04:00
DD Liu
e90000b20b
Merge pull request #1120 from Jacco/fix-379
prevent scaling factor too low (per direction)
2020-06-18 21:37:35 -04:00
Jacco Kulman
0f24b4b6b5 MIN_SCALE_FACTOR & clamping instead of halting 2020-06-17 06:47:20 +02:00
adroitwhiz
013aa47bc9
Merge pull request #1108 from adroitwhiz/no-origrot
Stop setting item.data.origRot
2020-06-15 10:59:16 -04:00
Jacco Kulman
e44127b492 prevent scaling factor too low (per direction) 2020-06-13 15:11:20 +02:00
adroitwhiz
c95f882d7e Fix color button turning white when it shouldn't
If you select a group with "mixed" gradient types, then color and color2
will both be MIXED. If you then select a shape with a solid color, it
won't reset color2, which will remain MIXED. We only want the background
to appear white if color2 is MIXED *and* the gradient type actually uses
color2. This is already done in the component itself, which only shows
the "mixed" icon if the gradient type is non-solid, but
colorToBackground left out this gradient type check.
2020-06-12 02:59:35 -04:00
adroitwhiz
2a1eaa8926
Merge pull request #997 from adroitwhiz/adjust-reshape-tolerance
Adjust reshape mode handle tolerance
2020-06-09 13:19:00 -04:00
adroitwhiz
e22295b68c Add handle padding and radius 2020-06-08 16:49:49 -04:00
adroitwhiz
3dac1b6adc
Merge pull request #1097 from adroitwhiz/scrollbar-padding
Make the room between canvas edges and scrollbars count as draggable
2020-06-04 15:23:12 -04:00
adroitwhiz
32e80364c1
Merge pull request #1000 from adroitwhiz/addpoint-divideat
Use divideAt in PointTool.addPoint so that adding new points doesn't affect curves' shape
2020-06-04 15:22:29 -04:00
adroitwhiz
b8c2ba79a9 Stop setting item.data.origRot 2020-06-04 11:28:38 -04:00
adroitwhiz
dc40eea771 Extend scrollbar hitbox to canvas edges 2020-06-03 12:48:47 -04:00
adroitwhiz
d02fe5fcf0
Merge pull request #1100 from adroitwhiz/delete-origpos
Delete item.data.origPos instead of setting it to null
2020-06-03 11:37:51 -04:00
adroitwhiz
813b34c981 Delete item.data.origPos instead of nulling it 2020-06-03 11:19:40 -04:00
DD Liu
cfe04ae548
Merge pull request #1083 from fsih/bumpGridOpacity
Bump grid opacity
2020-06-02 11:45:10 -04:00
adroitwhiz
e4017aa658 Use divideAt for PointTool.addPoint 2020-05-31 16:14:14 -04:00
DD Liu
db0a0a2b9b Change to a grayer shade 2020-05-29 18:15:38 -04:00
adroitwhiz
690efcb39f Use proper mouse delta in onBroadMouseUp
The given event.delta is the difference between the mouse down coords
and the mouse up coords, but we want the difference
between the last mouse drag coords and the mouse up coords.
2020-05-27 13:06:12 -04:00
adroitwhiz
baa95edc47 Set broad brush stroke angle to vertex normal 2020-05-27 13:06:12 -04:00
DD Liu
323c9f634e Bump grid opacity 2020-05-24 22:59:43 -04:00
DD Liu
2e88b6d070 Add upload and download image buttons to the playground 2020-05-24 18:34:02 -04:00
adroitwhiz
ec3348dc75 Increase reshape tool tolerance to match handle size
This causes the new dynamically-sized reshape handles to match their
previous size.
2020-05-22 20:07:45 -04:00
adroitwhiz
e110a04093 Set reshape handle size to match hit tolerance 2020-05-22 20:06:37 -04:00
adroitwhiz
55bc3dc4b6 Don't double-add points to broad brush path 2020-05-21 12:29:36 -04:00
adroitwhiz
a9a8789af6 Clear lastVec in onBroadMouseDown 2020-05-21 12:29:36 -04:00
adroitwhiz
87e01639c0
Merge pull request #991 from adroitwhiz/tight-bitmap-selection-bounds
Tighten bitmap selection bounds
2020-05-19 15:42:45 -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
adroitwhiz
aff7dc88f7 Remove redundant if (selectionRect) 2020-05-16 03:42:06 -04:00
adroitwhiz
de502d6843 Tighten bitmap selection bounds 2020-05-16 03:41:39 -04:00
adroitwhiz
b0164e7783
Merge pull request #922 from adroitwhiz/swapcolorsinselection-continue
Skip processing of child paths in swapColorsInSelection
2020-05-15 20:23:43 -04:00
DD Liu
9e70c96044
Merge pull request #984 from adroitwhiz/fix-empty-svg-center
Set rotation center of empty SVGs to (0, 0)
2020-05-15 14:57:39 -04:00
DD Liu
902b599cfa
Merge pull request #919 from adroitwhiz/handle-null-color
Handle `null` colors in bitmap shape tools
2020-05-15 14:56:42 -04:00
adroitwhiz
66b376b98d Fix rotation center of empty SVGs 2020-05-14 14:57:54 -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
DD Liu
5230e97903 Fix width/height switched 2020-05-11 17:56:22 -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
33659f1d16 Merge branch 'develop' into fillSpace 2020-05-06 22:46:48 -04:00
DD Liu
0d63987fea Move magic numbers to constants in layer.js 2020-05-06 22:46:33 -04:00
adroitwhiz
77f01b3ec4 Remove compound path TODOs from blob.js 2020-04-24 17:38:53 -04:00
DD Liu
7ffe87e712
Merge pull request #921 from adroitwhiz/mergeeraser-skip-child-paths
Skip processing of child paths in mergeEraser
2020-04-24 17:07:06 -04:00
adroitwhiz
1c6425f9e3 Filter out compound path children *before* looping 2020-04-21 21:29:30 -04:00
DD Liu
337f12b836 Fill the available space in the costume tab 2020-04-21 18:04:26 -04:00
DD Liu
8865291d04 Add new zoom level 2020-04-21 17:59:56 -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
ca76a99fb4 Add more space around the scrollbars 2020-04-21 12:31:06 -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
dd63f75a38 Clarify comments 2020-02-12 13:21:09 -05:00
DD Liu
591cf6d635 Slightly adjust the opacity per design feedback 2020-02-12 11:58:08 -05:00
DD Liu
37ede20e0a Fix a bug where the rectangles didnt get cleaned up from the view 2020-02-11 22:30:59 -05:00
DD Liu
e8c33c8779 Change the opacity code so that the crosshair stays opaque over the entirety of the selection 2020-02-11 21:44:45 -05:00
DD Liu
56a9e92458 Fix lint 2020-02-09 21:12:30 -05:00
DD Liu
00c0b303bf Adjust opacities 2020-02-08 01:07:23 -05:00
DD Liu
3907fd4f89 Fade drag crosshair if youre far away 2020-02-08 01:07:00 -05:00
DD Liu
23ee224ab1 Manually draw icons 2020-02-08 00:49:48 -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
56e0332ed2
Merge pull request #968 from paulkaplan/fix-eyedropper-crash
Fix Safari crash in color picker
2020-02-04 18:49:24 -05:00
Paul Kaplan
3470fd8232 Prevent rounding error when getting image data.
This was causing a crash on Safari. See #966 for more details.
2020-02-04 09:02:21 -05:00
DD Liu
bf2fa3c854 xMerge branch 'develop' into changeAltScale 2020-01-30 15:11:26 -05:00
DD Liu
4e8d190843
Merge pull request #925 from fsih/crosshair
Center crosshair snapping
2020-01-30 14:12:07 -05:00
DD Liu
18fa1e2b61 Fix incorrect crosshair size after zoom to fit 2020-01-29 20:56:43 -05:00
DD Liu
21f2b489d0 fix a crash if you deselect everything 2020-01-29 20:35:17 -05:00
DD Liu
3f46c04f19 Move anchor icon load to mouse down to avoid an issue where the view hasn't loaded yet 2020-01-29 12:01:01 -05:00
DD Liu
231c98da3c Only load anchorIcon if it doesn't exist 2020-01-29 11:59:22 -05:00
DD Liu
9a3a49b88e Altscale edge follows cursor 2020-01-29 11:47:28 -05:00
DD Liu
9e097ea8c8 Revert changes to scale while holding alt 2020-01-29 11:44:03 -05:00
DD Liu
68e53e7c30 Add to all modes besides reshape 2020-01-29 11:18:55 -05:00
DD Liu
e16a85adb1 fix lint 2020-01-28 12:08:27 -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
adroitwhiz
24ec9f76a6 travis ci 2020-01-28 12:08:27 -05:00
adroitwhiz
609fd939d9 Add transparent crosshair above dragged items 2020-01-28 12:08:27 -05:00
DD Liu
db67246dd5
Merge pull request #924 from fsih/fixStackingButtons
Fix stacking buttons
2020-01-27 17:30:40 -05:00
DD Liu
f7bade8781 Instead of increasing the max width of tools, slightly increase the width at which paint editor switches over to 2 rows of tools so that they have enough space to make 2 rows 2020-01-17 14:10:37 -05:00
adroitwhiz
50172d494c Skip processing of child paths in color swap 2020-01-09 15:02:20 -05:00
adroitwhiz
41e0765657 Skip processing of child paths in mergeEraser 2020-01-09 15:00:12 -05:00
Paul Kaplan
b8434137f2
Merge pull request #932 from LLK/paulkaplan-patch-1
Emit 1x1 blank bitmap data instead of full empty canvas
2019-12-10 05:40:18 -05:00
Paul Kaplan
7351468041
Update update-image-hoc.jsx 2019-12-09 16:18:21 -05:00
Paul Kaplan
9491b7eb09
Emit 1x1 blank bitmap data instead of full empty canvas
This fixes the issue where you cannot save blank bitmaps in scratch. We were trying to create PNG files which cannot have 0x0 size.
2019-12-09 16:03:13 -05:00