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: 修复分割线在深色背景下颜色渲染异常 & 内容宽高未包含分割线的问题 #2961

Merged
merged 3 commits into from
Nov 7, 2024

Conversation

lijinke666
Copy link
Member

@lijinke666 lijinke666 commented Nov 7, 2024

👀 PR includes

🎨 Enhance

  • Code style optimization
  • Refactoring
  • Change the UI
  • Improve the performance
  • Type optimization

📝 Description

回滚 #2919 的修改

G 6.0 颜色混合模式有调整, 和 4.x 有不同的配置, 相同颜色的 Line 在不同背景色绘制, 实际渲染的颜色会不一致

https://developer.mozilla.org/zh-CN/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation

https://github.com/antvis/G/blob/next/packages/g-plugin-canvas-renderer/src/shapes/styles/Default.ts#L117

  1. 在绘制分割线前, 先填充一个和单元格相同的底色, 保证分割线和单元格边框表现和 V1 一致
  2. 修复 facet.getContentHeight()facet.getContentWidth() 获取的值未包含分割线宽度的问题

🖼️ Screenshot

Before After
image image

🔗 Related issue link

🔍 Self-Check before the merge

  • Add or update relevant docs.
  • Add or update relevant demos.
  • Add or update test case.
  • Add or update relevant TypeScript definitions.

Copy link

vercel bot commented Nov 7, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
antvis-s2 ❌ Failed (Inspect) Nov 7, 2024 3:55am

@github-actions github-actions bot added pr(fix) bug fix next 2.0-next 版本的问题 labels Nov 7, 2024
Copy link
Contributor

github-actions bot commented Nov 7, 2024

Size Change: +143 B (+0.04%)

Total Size: 336 kB

Filename Size Change
./packages/s2-core/dist/index.min.js 236 kB +143 B (+0.06%)
ℹ️ View Unchanged
Filename Size
./packages/s2-core/dist/style.min.css 388 B
./packages/s2-react/dist/index.min.js 70.9 kB
./packages/s2-react/dist/style.min.css 3.77 kB
./packages/s2-vue/dist/index.min.js 23 kB
./packages/s2-vue/dist/style.min.css 1.85 kB

compressed-size-action

@lijinke666 lijinke666 changed the title fix: 修复分割线在深色背景下颜色渲染异常的问题 fix: 修复分割线在深色背景下颜色渲染异常 & 内容宽高未包含分割线的问题 Nov 7, 2024
@lijinke666 lijinke666 merged commit e759891 into next Nov 7, 2024
7 of 9 checks passed
@lijinke666 lijinke666 deleted the fix-split-line branch November 7, 2024 08:21
@lijinke666
Copy link
Member Author

🎉 This PR is included in version @antv/s2-v2.0.0-next.32 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lijinke666
Copy link
Member Author

🎉 This PR is included in version @antv/s2-react-components-v1.1.0-next.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
next 2.0-next 版本的问题 pr(fix) bug fix released on @next
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants