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

fix: HTML canvas does not match the canvas range after the camera is applied (#1702) #1752

Merged
merged 1 commit into from
Aug 16, 2024

Conversation

wang1212
Copy link
Member

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / Document optimization
  • TypeScript definition update
  • Refactoring
  • Performance improvement
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

fixed #1702

💡 Background and solution

When the html canvas uses a div element as a container, the camera's transformation will be applied to the div element, so that after the user pans or zooms, the div cannot maintain the same width and height as the canvas element. As a container for rendering html elements, this will cause some problems, such as #1702 .

The solution is to add an additional div element as the html canvas container, whose direct child element is the camera's div element. In this hierarchical structure, the camera's transformation and rendering container are independent and do not affect each other. The html container div will always remain consistent with the canvas element.

📝 Changelog

Language Changelog
🇺🇸 English fix: HTML canvas does not match the canvas range after the camera is applied (#1702)
🇨🇳 Chinese fix: html 画布在相机作用下不能和 canvas 画布范围保持一致 (#1702 )

☑️ Self Check before Merge

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

@wang1212 wang1212 requested review from Aarebecca and lvisei August 14, 2024 02:51
@lvisei
Copy link
Member

lvisei commented Aug 14, 2024

@wang1212 CI 挂了

@wang1212
Copy link
Member Author

@wang1212 CI 挂了

解决了

@wang1212 wang1212 merged commit bc65583 into release Aug 16, 2024
3 checks passed
@wang1212 wang1212 deleted the fix-1702 branch August 16, 2024 05:28
wang1212 added a commit that referenced this pull request Aug 16, 2024
* refactor: fix dev tools (#1750)

* chore: fix build env

* refactor: fix typo and lint

* chore: update webpack config

* fix: HTML canvas does not match the canvas range after the camera is applied (#1702) (#1752)

* Version Packages (#1753)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

---------

Co-authored-by: Aaron <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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.

2 participants