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(Layer): 3rd Patch of Group Rewrite ♦️ #7860

Closed
wants to merge 98 commits into from
Closed

Conversation

ShaMan123
Copy link
Contributor

@ShaMan123 ShaMan123 commented Apr 4, 2022

Layer

This is pretty straight forward.
Subclass of Group.
Adapted layout logic to fit Layer's needs
Added logic in Group to support nesting Layer.
This is AMAZING because Layer can now be used to boost perf. We can split a canvas/group's objects into 2 sub collections, one for active objects and one for non active ones. We can then use Layer to render all the non actives and have it cached while setting group not to cache.

Gist

Layer will layout itself once it is added to a collection and by listening to it's parent layouts

  • canvas - resize event (from the setDimensions method - should we listen to anything else? MutationObserver works both on web/node)
  • group - layout event

Dev

Merge the 2nd patch, update from master and then merge this one.

View the diff

closes #3000
closes #7692

https://fx32zv.csb.app/

Cutting Edge

Read the comments below to see what can be achieved using Layer:

@github-actions
Copy link
Contributor

github-actions bot commented Jun 16, 2022

Code Coverage Summary

> fabric@5.1.0 coverage:report
> nyc report --reporter=lcov --reporter=text

-----------|---------|----------|---------|---------|-----------------------------------------------
File       | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s                             
-----------|---------|----------|---------|---------|-----------------------------------------------
All files  |   83.14 |    76.19 |   85.51 |   82.87 |                                               
 fabric.js |   83.14 |    76.19 |   85.51 |   82.87 | ...,31187,31261,31272-31337,31460,31559,31795 
-----------|---------|----------|---------|---------|-----------------------------------------------

@github-actions
Copy link
Contributor

github-actions bot commented Jun 16, 2022

Code Coverage Summary

> fabric@5.1.0 coverage:report
> nyc report --reporter=lcov --reporter=text

-----------|---------|----------|---------|---------|-----------------------------------------------
File       | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s                             
-----------|---------|----------|---------|---------|-----------------------------------------------
All files  |   83.19 |    76.23 |   85.51 |   82.92 |                                               
 fabric.js |   83.19 |    76.23 |   85.51 |   82.92 | ...,31190,31264,31275-31340,31463,31562,31798 
-----------|---------|----------|---------|---------|-----------------------------------------------

@stale
Copy link

stale bot commented Jul 10, 2022

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.

@stale stale bot added the stale Issue marked as stale by the stale bot label Jul 10, 2022
@ShaMan123 ShaMan123 removed the stale Issue marked as stale by the stale bot label Jul 10, 2022
@stale
Copy link

stale bot commented Jul 30, 2022

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.

@stale stale bot added the stale Issue marked as stale by the stale bot label Jul 30, 2022
@ShaMan123 ShaMan123 removed the stale Issue marked as stale by the stale bot label Aug 1, 2022
Copy link
Contributor Author

@ShaMan123 ShaMan123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MAJOR update from master
7860.diff.txt from before

@fabricjs fabricjs deleted a comment from github-actions bot Feb 19, 2023
@fabricjs fabricjs deleted a comment from github-actions bot Feb 19, 2023
@fabricjs fabricjs deleted a comment from github-actions bot Feb 19, 2023
@asturur asturur removed the group label Jan 14, 2024
@asturur asturur closed this Jan 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upvote: Layers multiple canvas layer support?
2 participants