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

[Bug]: Removing elements(Textbox) from a Group and then re-add them can cause the elements to render blurry. #10135

Open
7 tasks done
hui200102 opened this issue Sep 9, 2024 · 14 comments

Comments

@hui200102
Copy link

hui200102 commented Sep 9, 2024

CheckList

  • I agree to follow this project's Code of Conduct
  • I have read and followed the Contributing Guide
  • I have read and followed the Issue Tracker Guide
  • I have searched and referenced existing issues and discussions
  • I am filing a BUG report.
  • I have managed to reproduce the bug after upgrading to the latest version
  • I have created an accurate and minimal reproduction

Version

6.4.2, also on 5.3.0

In What environments are you experiencing the problem?

Chrome

Node Version (if applicable)

None

Link To Reproduction

CodeSandbox

Steps To Reproduce

  1. Click the "Add Group" button
    Locate and click the button labeled "Add Group" on the interface.

  2. Click the text
    In the newly appeared element or area, find the relevant text and click on it.

  3. Click on a blank area
    Click the mouse on an empty space in the interface to complete the operation.

Notes

You can repeat steps 2 and 3 multiple times to compare the effects:

  • Click the text again
  • Click on a blank area again
  • Observe how the behavior changes or remains consistent with each interaction

This repeated testing will help you better understand the functionality and any potential variations in the behavior of the group and text elements.

Expected Behavior

If the clipPath of the Textbox is removed from the code, the bug will disapper

image

Actual Behavior

The text became blurry when adding to group again.
image

Error Message & Stack Trace

No response

@asturur
Copy link
Member

asturur commented Sep 9, 2024

I see no such UI in the linked sandbox

@hui200102
Copy link
Author

I see no such UI in the linked sandbox
You may need to open the Preview and then click Add Group.

image

@hui200102
Copy link
Author

If you can't open CodeSandbox, you can use this:
https://stackblitz.com/~/github.com/hui200102/fabric-issue (login required)

@cocokechun
Copy link

This currently has been causing a lot of issues for our product development and we believe this could affect many other people too. We'd REALLY appreciate if someone can help prioritize this. Thanks!

@zhe-he
Copy link
Contributor

zhe-he commented Sep 10, 2024

clipPath 会强制走缓存,关闭它,你可能还需要重写group的drawObject。

The clipPath will force caching; if you disable it, you may also need to rewrite the drawObject of the group.

fix demo

@hui200102
Copy link
Author

clipPath 会强制走缓存,关闭它,你可能还需要重写group的drawObject。

fix demo

哇, 十分感谢, 解决了我的问题

@hui200102
Copy link
Author

fix demo

clipPath 会强制走缓存,关闭它,你可能还需要重写group的drawObject。

fix demo

hi 大佬 group 的 drawObject 应该怎么改呢, 我现在修改了 needsItsOwnCache 导致我 group 里面的元素渲染混乱了

@zhe-he
Copy link
Contributor

zhe-he commented Sep 10, 2024

@hui200102
这应该是你要的。
This should be what you want.
frame group

@hui200102
Copy link
Author

@hui200102 这应该是你要的。 This should be what you want. frame group

这可能不是我想要的我们可以看到在之前的 fix demo 中 group 只显示了 TextBox clipPath 的区域, 我想 group 区域都显示
image

@zhe-he
Copy link
Contributor

zhe-he commented Sep 11, 2024

@hui200102
Please take a close look at this.
demo

@hui200102
Copy link
Author

@hui200102 Please take a close look at this. demo

好的 谢谢!

@hui200102
Copy link
Author

@hui200102 Please take a close look at this. demo

大佬 5.3 也能这样修复吗?

@zhe-he
Copy link
Contributor

zhe-he commented Sep 11, 2024

@hui200102 Please take a close look at this. demo

大佬 5.3 也能这样修复吗?

no

@hui200102
Copy link
Author

@hui200102 Please take a close look at this. demo

大佬 5.3 也能这样修复吗?

no

好吧, 谢谢了

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

No branches or pull requests

4 participants