-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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(Object): fill-parent
layout
#7901
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
in case object is a collection
Code Coverage Summary
|
Code Coverage Summary
|
Code Coverage Summary
|
Code Coverage Summary
|
Code Coverage Summary
|
Code Coverage Summary
|
Code Coverage Summary
|
Code Coverage Summary
|
Code Coverage Summary
|
Code Coverage Summary
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
2 tasks
closing in favor of LayoutManager hook onAfterLayout, layout:after event |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Gist
This PR adds support for
fill-parent
layout option on Object.This complements Layer and the layout engine.
Makes
backgroundColor | fill | stroke
on Group redundant.Same goes for bg/overlay image/color on Canvas. The next PR can deprecate them, which is good for v6 and layering in particular.
Changes
src/util/parent_resize_observer.js
- extracted logic from Layersrc/shapes/layer.class.js
- extracted logicsrc/shapes/group.class.js
- adaptations + important fix 2e35a8c ported to fix(Group): patch2 minors #7900 9a5fac1src/mixins/stateful.mixin.js
- will save state of nested objects/gradients/filters (clipPath etc.) instead of copying them entirely. This adaptation is needed because I used circular refs instead of a mixin forParentResizeObserver
(which will probably be the standard for fabric after migrating to TS)src/shapes/circle.class.js
src/shapes/ellipse.class.js
I handled Path and others by scaling. Thoughts?
Dev
First merge #7860 update from master and merge this one.
View the diff
Test
Kitchensink._.Fabric.js.Demos.-.Google.Chrome.2022-04-23.16-41-58.mp4