Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(eraser_brush): erasable=deep #7100

Merged
merged 181 commits into from
Jul 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
181 commits
Select commit Hold shift + click to select a range
abc5b8f
Create eraser_brush.class.js
ShaMan123 Apr 6, 2021
6d9366e
Update object.class.js
ShaMan123 Apr 6, 2021
d2d4937
build
ShaMan123 Apr 6, 2021
822b0f9
buil
ShaMan123 Apr 6, 2021
196867a
lint
ShaMan123 Apr 6, 2021
d66f298
dist
ShaMan123 Apr 6, 2021
ca94c5a
Update eraser_brush.class.js
ShaMan123 Apr 6, 2021
05f421e
dist
ShaMan123 Apr 6, 2021
02f3360
regression
ShaMan123 Apr 7, 2021
036c504
Revert "regression"
ShaMan123 Apr 7, 2021
f502e94
fix lint regression
ShaMan123 Apr 7, 2021
6f24277
Revert "lint"
ShaMan123 Apr 7, 2021
80ec330
Update eraser_brush.class.js
ShaMan123 Apr 7, 2021
92d3bd1
Update eraser_brush.class.js
ShaMan123 Apr 7, 2021
e89b406
lint + fixed regression
ShaMan123 Apr 7, 2021
48634eb
Update eraser_brush.class.js
ShaMan123 Apr 7, 2021
302a23b
fix: bind eraser to initial transform matrix
ShaMan123 Apr 7, 2021
cce4ac1
dist
ShaMan123 Apr 7, 2021
e19b91b
Revert "fix: bind eraser to initial transform matrix"
ShaMan123 Apr 7, 2021
072a6fb
Revert "dist"
ShaMan123 Apr 7, 2021
6d9c7ff
Update eraser_brush.class.js
ShaMan123 Apr 7, 2021
617b1cd
interactive erasing
ShaMan123 Apr 7, 2021
1916ea1
Update eraser_brush.class.js
ShaMan123 Apr 7, 2021
135a27c
support selective erasing - DONE
ShaMan123 Apr 8, 2021
4667bd6
build dist
ShaMan123 Apr 8, 2021
7a7ef60
add erasable prop to toObject
ShaMan123 Apr 8, 2021
10bbfae
Update static_canvas.class.js
ShaMan123 Apr 8, 2021
96cddc2
canvas erasable logic
ShaMan123 Apr 8, 2021
1894fda
Revert "Update static_canvas.class.js"
ShaMan123 Apr 8, 2021
8e71ed4
Revert "canvas erasable logic"
ShaMan123 Apr 8, 2021
e7f018e
Update object.class.js
ShaMan123 Apr 8, 2021
6da48cd
canvas eraser logic
ShaMan123 Apr 8, 2021
21f5289
fix onMouseDown behavior
ShaMan123 Apr 8, 2021
07481ba
extends canvas with `setErasable`
ShaMan123 Apr 8, 2021
127de4b
finalize
ShaMan123 Apr 9, 2021
8f5cc24
Update eraser_brush.class.js
ShaMan123 Apr 9, 2021
c4e743a
Update eraser_brush.class.js
ShaMan123 Apr 9, 2021
4126142
Update object.class.js
ShaMan123 Apr 9, 2021
85cbd62
fix eraser brush background
ShaMan123 Apr 9, 2021
9c47db2
revert dist to origin
ShaMan123 Apr 9, 2021
42d16ea
fromObject + cleanup
ShaMan123 Apr 9, 2021
f1404a7
toObject/fromObject
ShaMan123 Apr 9, 2021
ec197db
Update eraser_brush.class.js
ShaMan123 Apr 9, 2021
ca025d8
rename StrokeClipPath -> EraserPath
ShaMan123 Apr 9, 2021
21a28f4
support image background opacity
ShaMan123 Apr 9, 2021
8d8681c
canvas color opacity adjustment
ShaMan123 Apr 9, 2021
fecd23e
organize
ShaMan123 Apr 9, 2021
c8285a8
add comments for debugability
ShaMan123 Apr 9, 2021
7382d47
Update eraser_brush.class.js
ShaMan123 Apr 10, 2021
836e14e
fabric.EraserPath extend sfabric.Collection
ShaMan123 Apr 10, 2021
cc65f33
lint
ShaMan123 Apr 10, 2021
0a75b4c
Update eraser_brush.class.js
ShaMan123 Apr 10, 2021
c5a9f38
prepare for color clipping
ShaMan123 Apr 10, 2021
c694cbe
fix typo
ShaMan123 Apr 10, 2021
b34b0eb
Update eraser_brush.class.js
ShaMan123 Apr 10, 2021
4b6f62e
overlay eraser
ShaMan123 Apr 10, 2021
8a50a96
organize
ShaMan123 Apr 10, 2021
36d7448
Update eraser_brush.class.js
ShaMan123 Apr 10, 2021
ca02dd7
Update eraser_brush.class.js
ShaMan123 Apr 10, 2021
689aaf7
comment
ShaMan123 Apr 10, 2021
c4e31f2
Update eraser_brush.class.js
ShaMan123 Apr 10, 2021
7f7ff77
fix restoring logic
ShaMan123 Apr 10, 2021
175d45d
Update eraser_brush.class.js
ShaMan123 Apr 10, 2021
e98bcb3
Update eraser_brush.class.js
ShaMan123 Apr 10, 2021
9c537b6
fix race condition
ShaMan123 Apr 10, 2021
42b3182
Update object.class.js
ShaMan123 Apr 10, 2021
6c6d999
comment
ShaMan123 Apr 10, 2021
8c9032f
comment
ShaMan123 Apr 10, 2021
767c14b
comment
ShaMan123 Apr 10, 2021
0de2fcb
comment
ShaMan123 Apr 10, 2021
9eb7734
comment
ShaMan123 Apr 10, 2021
b436e09
cleanup
ShaMan123 Apr 10, 2021
3bb0160
update comment from PR description
ShaMan123 Apr 10, 2021
d8c0f81
Update eraser_brush.class.js
ShaMan123 Apr 10, 2021
1ce17c9
Update eraser_brush.class.js
ShaMan123 Apr 10, 2021
3c8115e
progress - supporting animations while erasing
ShaMan123 Apr 11, 2021
b337462
refactor to use without cloning canvas
ShaMan123 Apr 11, 2021
0573bc0
refactor success
ShaMan123 Apr 11, 2021
75bbd0f
Update eraser_brush.class.js
ShaMan123 Apr 11, 2021
c6d521a
cleanup
ShaMan123 Apr 11, 2021
886f3f5
add events
ShaMan123 Apr 11, 2021
223181b
connect eraser to renderAll
ShaMan123 Apr 11, 2021
c15599c
comments + cleanup
ShaMan123 Apr 11, 2021
10bcc6d
revert option
ShaMan123 Apr 11, 2021
08ea872
cleanup
ShaMan123 Apr 11, 2021
0d0b8de
comments + minor change in event call timing
ShaMan123 Apr 11, 2021
4f8aaf7
lint
ShaMan123 Apr 11, 2021
62a3621
getEraser
ShaMan123 Apr 11, 2021
78e664a
typo
ShaMan123 Apr 11, 2021
456a88d
typo
ShaMan123 Apr 11, 2021
8a8898c
correct comment
ShaMan123 Apr 11, 2021
644bc83
Update eraser_brush.class.js
ShaMan123 Apr 11, 2021
d36aaa1
lint double-quotes to single
ShaMan123 Apr 12, 2021
5ddde6b
lint
ShaMan123 Apr 12, 2021
447ba04
fix build order
ShaMan123 Apr 16, 2021
c80f564
rename/move
ShaMan123 Apr 18, 2021
73fe2dd
manually revert object
ShaMan123 Apr 18, 2021
aac2ae5
extend object, canvas
ShaMan123 Apr 18, 2021
f937c6d
revert canvas a
ShaMan123 Apr 18, 2021
c08ce92
revert 223181b17729100ea27406e1a3eb35a1c8582852
ShaMan123 Apr 18, 2021
50d852f
Update object.class.js
ShaMan123 Apr 18, 2021
ae82500
Update build.js
ShaMan123 Apr 18, 2021
b66e091
rename file
ShaMan123 Apr 18, 2021
d42eb0f
lint
ShaMan123 Apr 18, 2021
e3a40b2
remove unnecessary property
ShaMan123 Apr 19, 2021
0e227a5
support nested erasing (groups)
ShaMan123 Apr 20, 2021
f6126bf
bounding objects
ShaMan123 Apr 26, 2021
7fd927d
deprecate EraserPath
ShaMan123 Apr 26, 2021
7e714d7
fix width/height of rect for clip path
ShaMan123 Apr 26, 2021
c8ac0d6
Revert "fix width/height of rect for clip path"
ShaMan123 Apr 26, 2021
7badf80
expose Helpers to set `erasable` on color
ShaMan123 Apr 26, 2021
63d76d5
Update eraser_brush.mixin.js
ShaMan123 Apr 26, 2021
99279a7
Update eraser_brush.mixin.js
ShaMan123 Apr 26, 2021
972e07b
deprecate prepareCanvas
ShaMan123 Apr 27, 2021
910f14e
patch canvas serialization
ShaMan123 Apr 27, 2021
7fe1d1e
patch canvas color toSVG
ShaMan123 Apr 27, 2021
1257489
export to svg
ShaMan123 Apr 29, 2021
47e6873
toSVG reviver
ShaMan123 Apr 29, 2021
8f80a37
Update eraser_brush.mixin.js
ShaMan123 Apr 29, 2021
498e722
Update eraser_brush.mixin.js
ShaMan123 Apr 29, 2021
6291cf5
add data to erasing:end event
ShaMan123 Apr 29, 2021
2693246
deprecate forCanvasDrawables
ShaMan123 Apr 29, 2021
3e6630c
make defs inline
ShaMan123 Apr 29, 2021
cf26359
Revert "make defs inline"
ShaMan123 May 1, 2021
e73afc0
account for strokeWidth
ShaMan123 May 1, 2021
00a191c
build option
ShaMan123 May 1, 2021
d071979
Update eraser_brush.mixin.js
ShaMan123 May 1, 2021
3777d13
Revert "bounding objects"
ShaMan123 May 2, 2021
705196d
finalize revert from Group#boundingObjects
ShaMan123 May 2, 2021
67ec47b
Update eraser_brush.mixin.js
ShaMan123 May 2, 2021
03785ef
Path#toSVG
ShaMan123 May 2, 2021
6016d20
Update eraser_brush.mixin.js
ShaMan123 May 2, 2021
42082a5
Update eraser_brush.mixin.js
ShaMan123 May 2, 2021
9a1a5fc
account for additionalTransform
ShaMan123 May 2, 2021
6ea7f93
Update eraser_brush.mixin.js
ShaMan123 May 2, 2021
4558a11
Update eraser_brush.mixin.js
ShaMan123 May 3, 2021
e44bc2a
revert dist to 7efa022a0ed82a48a9bb65658b2e71940ab22139
ShaMan123 May 4, 2021
0bd4127
Revert "revert dist to 7efa022a0ed82a48a9bb65658b2e71940ab22139"
ShaMan123 May 4, 2021
88d1056
revert dist to 0d7db7b9c4bcebae9725283c07f2b4bb317832e0
ShaMan123 May 4, 2021
cd130c9
revert to 0d7db7b9c4bcebae9725283c07f2b4bb317832e0
ShaMan123 May 4, 2021
3786e5e
Update package.json
asturur May 14, 2021
0f81013
lint
ShaMan123 May 14, 2021
da947fc
typo
ShaMan123 May 28, 2021
31137a9
fix(fabric.EraserBrush): add safety check
ShaMan123 May 28, 2021
59a4ad6
feat(eraser_brush): erasable=`deep`
ShaMan123 Jun 4, 2021
63a916c
JSDOC
ShaMan123 Jun 4, 2021
46294b6
refactor `prepareCollectionTraversal` to support `erasable=deep`
ShaMan123 Jun 4, 2021
30203c8
lint
ShaMan123 Jun 4, 2021
393a903
fix 46294b68
ShaMan123 Jun 4, 2021
b051125
lint
ShaMan123 Jun 4, 2021
f3148a8
manage group's eraser on group change
ShaMan123 Jun 4, 2021
4d47d00
Update eraser_brush.mixin.js
ShaMan123 Jun 4, 2021
ae7a829
move _isErasable to EraserBrush
ShaMan123 Jun 4, 2021
5e2e793
add links to demo
ShaMan123 Jun 5, 2021
7b820a4
fix typo
ShaMan123 Jun 7, 2021
82a3d7d
support nested clip path applied to eraser
ShaMan123 Jun 9, 2021
b9ca736
lint
ShaMan123 Jun 10, 2021
d35272a
refactor applyClipPathToPath, expose getClipPath on object
ShaMan123 Jun 10, 2021
9860e6a
getEraser: return undefined to conform with getClipPath
ShaMan123 Jun 10, 2021
ed60524
Update eraser_brush.mixin.js
ShaMan123 Jun 10, 2021
e2c6774
fix bounds changing when updating eraser
ShaMan123 Jun 10, 2021
c1a0edc
expose setClipPath
ShaMan123 Jun 13, 2021
412f820
Update eraser_brush.mixin.js
ShaMan123 Jun 13, 2021
33633e7
fix(background/overlay color): align with default behavior
ShaMan123 Jun 18, 2021
7c4e732
fix(eraser_brush.mixin): fix eraser after resizing object
ShaMan123 Jun 19, 2021
3f1802c
lint
ShaMan123 Jun 19, 2021
f438598
typo
ShaMan123 Jun 19, 2021
ddf98ec
fix(eraser_brush.mixin): resize object
ShaMan123 Jun 19, 2021
e021f9a
Update eraser_brush.mixin.js
ShaMan123 Jun 19, 2021
0973cb1
Update eraser_brush.mixin.js
ShaMan123 Jun 19, 2021
9ee0d03
Update eraser_brush.mixin.js
ShaMan123 Jun 19, 2021
512f67b
fix(setClipPath): mark as dirty
ShaMan123 Jun 21, 2021
d7b5725
Update eraser_brush.mixin.js
ShaMan123 Jun 21, 2021
2b59204
Merge branch 'master' into group-erasable-option
ShaMan123 Jun 26, 2021
3b9cd6b
update from upstream/master
ShaMan123 Jun 26, 2021
a7d1402
Update CHANGELOG.md
ShaMan123 Jun 26, 2021
14251b2
lint
ShaMan123 Jun 26, 2021
4b108b8
Merge branch 'master' into group-erasable-option
ShaMan123 Jun 26, 2021
e8d445a
Merge remote-tracking branch 'upstream/master' into group-erasable-op…
ShaMan123 Jun 29, 2021
224b0c7
test collection instead of group
ShaMan123 Jun 29, 2021
397c829
Merge branch 'master' into group-erasable-option
ShaMan123 Jul 11, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
- fix(fabric.Object): support `excludeFromExport` set on `clipPath` [#7148](https://github.com/fabricjs/fabric.js/pull/7148).
- fix(fabric.Group): support `excludeFromExport` set on objects [#7148](https://github.com/fabricjs/fabric.js/pull/7148).
- fix(fabric.StaticCanvas): support `excludeFromExport` set on `backgroundColor`, `overlayColor`, `clipPath` [#7148](https://github.com/fabricjs/fabric.js/pull/7148).
- fix(fabric.EraserBrush): support object resizing (needed for eraser) [#7100](https://github.com/fabricjs/fabric.js/pull/7100).
- fix(fabric.EraserBrush): support canvas resizing (overlay/background drawables) [#7100](https://github.com/fabricjs/fabric.js/pull/7100).
- fix(fabric.EraserBrush): propagate `clipPath` of group to erased objects when necessary so it is correct when ungrouping/removing from group [#7100](https://github.com/fabricjs/fabric.js/pull/7100).
- fix(fabric.EraserBrush): introduce `erasable = deep` option for `fabric.Group` [#7100](https://github.com/fabricjs/fabric.js/pull/7100).
- feat(fabric.Collection): the `contains` method now accepts a second boolean parameter `deep`, checking all descendants, `collection.contains(obj, true)` [#7139](https://github.com/fabricjs/fabric.js/pull/7139).
- fix(fabric.StaticCanvas): disposing canvas now restores canvas size and style to original state.

Expand Down
Loading