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

Fit fabric.ActiveSelection to clipped object #5908

Closed
DefeninMaxime opened this issue Oct 3, 2019 · 4 comments · Fixed by #7858
Closed

Fit fabric.ActiveSelection to clipped object #5908

DefeninMaxime opened this issue Oct 3, 2019 · 4 comments · Fixed by #7858

Comments

@DefeninMaxime
Copy link

Is your feature request related to a problem? Please describe.
I'm frustrated when I use clipTo method on a fabric.Object, the selection has been make from original content of the object and not from the real displayed content.

Describe the solution you'd like
Add a mode to fit the selection of a clipped object to the real displayed content instead of the original content.
The selection can be a rect, it's not necessary to follow pixel per pixel.

@asturur
Copy link
Member

asturur commented Oct 7, 2019

That feature is not available yet.
Clipped objects retains the object bbox.
Exception made for images, that can have a different area if used with cropX, cropY, width height

@DefeninMaxime
Copy link
Author

I made a cropper which can rotate/skew/scale it self and placed wherever on Image. clipTo function of Image use matrix transformation of cropper object to render Image. So only cropX, cropY, width, height is not enought for me.

Have you any idea about this feature in your roadmap ?

@asturur
Copy link
Member

asturur commented Oct 26, 2019

well i m not sure how your cropper works.
The idea is to move the controls rendering in the upper canvas, the function to draw the bounding box and the controls are being modified, the one for the controls are ready but i cannot release them yet.

Once that is done ( and i m using it, is not parked in a branch ) you can define control position per object, with a function, so you would be able to apply custom logic to controls.

I would suggest you to use clipPath for that, that would make easy to track clipping area position.

Does clipPath fit your use case? or the blurrines for now is stopping you?

@ShaMan123 ShaMan123 linked a pull request Mar 8, 2022 that will close this issue
21 tasks
@ShaMan123 ShaMan123 linked a pull request Apr 10, 2022 that will close this issue
@ShaMan123
Copy link
Contributor

#7868

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants