-
-
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(): dataURL export - filter objects #7788
Conversation
This reverts part of commit ea10ee5.
Code Coverage Summary
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is great!
Thanks. So should I merge? |
I am thinking of supporting group as well. |
looks good to me
sounds good, as I recall that's how toDataURL works on a fabric canvas as well |
It uses exiting objects on a new canvas |
* feat(): filter options * visual test
commit ddda273 Author: ShaMan123 <shacharnen@gmail.com> Date: Fri Mar 11 10:54:28 2022 +0200 fix selection cases commit fdba87f Author: ShaMan123 <shacharnen@gmail.com> Date: Fri Mar 11 10:54:14 2022 +0200 rename commit 0551fe0 Author: ShaMan123 <shacharnen@gmail.com> Date: Fri Mar 11 10:28:49 2022 +0200 forward/backward commit befdcd8 Author: ShaMan123 <shacharnen@gmail.com> Date: Fri Mar 11 10:00:48 2022 +0200 rtl support prep commit 36bbcb1 Author: ShaMan123 <shacharnen@gmail.com> Date: Fri Mar 11 09:20:32 2022 +0200 Update itext.class.js commit c021097 Author: ShaMan123 <shacharnen@gmail.com> Date: Fri Mar 11 09:03:07 2022 +0200 feat(IText): selectionDirection, selectionDirection commit 4f9529e Author: amir hossein <a.mehrabi.70@gmail.com> Date: Wed Feb 16 09:46:27 2022 +0330 fix(fabric.Text): consider justify text alignment in RTL text commit fb3054b Author: amir hossein <a.mehrabi.70@gmail.com> Date: Sat Feb 12 13:23:07 2022 +0330 fix(fabric.Text): support RTL different text alignments commit 07f597d Author: ShaMan123 <shacharnen@gmail.com> Date: Thu Mar 10 20:28:48 2022 +0200 Update text.js commit 28596f5 Author: ShaMan123 <shacharnen@gmail.com> Date: Thu Mar 10 20:17:45 2022 +0200 fix(tests) commit 681c019 Author: ShaMan123 <shacharnen@gmail.com> Date: Thu Mar 10 20:05:57 2022 +0200 pathSide commit 1a3f138 Author: ShaMan123 <shacharnen@gmail.com> Date: Thu Mar 10 19:40:40 2022 +0200 lint + rename commit 3b80c7b Author: ShaMan123 <shacharnen@gmail.com> Date: Thu Mar 10 19:26:21 2022 +0200 cleanup commit 76f94b4 Author: ShaMan123 <shacharnen@gmail.com> Date: Thu Mar 10 18:56:00 2022 +0200 feat(Text): textAlign `start`, `end` and a bit of tidying up commit 2e608dc Author: Shachar <34343793+ShaMan123@users.noreply.github.com> Date: Wed Mar 9 09:37:43 2022 +0200 feat(): dataURL export - filter objects (fabricjs#7788) * feat(): filter options * visual test commit 1ea2465 Author: Amirhossein Mehrabi <a.mehrabi.70@gmail.com> Date: Sat Feb 26 22:36:46 2022 +0330 fix(fabric.Text): add the previous code as comment
"excludeFromExport" already exists. In the future, to "centralize" all export options, it might be nice to accept an object instead of a boolean
Even a filter function
|
I didn't think of |
mmm, from my experience, most filters of that type are based on object properties, not on dynamic logic, so in the end it would be redundant to delete that property and pass everything to functions:
On the other hand, there is no need to choose between functions and boolean properties, in many frameworks a design pattern that allows a value or a function is common. |
I want to make fabric more intuitive. That's why |
Added a nice and simple option to filter objects for canvas export
This option is shallow, it doesn't filter objects under groups, yet...