Skip to content

Conversation

@moayuisuda
Copy link
Contributor

修复之前 axis render 的背景色 & 偏移问题

@gemini-code-assist
Copy link

Summary of Changes

Hello @moayuisuda, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

此拉取请求主要修复了轴标签渲染中的两个关键问题:HTML 标签的背景色显示不正确以及其位置偏移。通过精确控制样式应用和动态调整 HTML 标签的水平位置,确保了轴标签的正确渲染和视觉一致性。此外,还提升了 HTML 元素的默认交互性,并更新了项目版本。

Highlights

  • HTML 轴标签背景色修复: 通过在应用样式时忽略 fill 属性,解决了 HTML 轴标签背景色显示不正确的问题。
  • HTML 轴标签偏移修复: 在渲染 HTML 轴标签后,根据其边界框动态调整 x 坐标,实现了居中对齐,解决了位置偏移问题。
  • HTML 元素交互性增强: 为新创建的 HTML 元素默认添加了 pointerEvents: 'auto' 样式,确保其默认可响应鼠标事件。
  • 版本更新: 项目版本号从 2.1.8 更新至 2.1.11
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

这个 PR 修复了 axis 渲染时背景色和偏移的问题。代码变更主要在 labels.tsextend-display-object.ts 中。在 labels.ts 中,通过在应用样式时忽略 HTML 节点的 fill 属性来修复背景色问题,并为 HTML 标签增加了居中对齐的逻辑来修正偏移。在 extend-display-object.ts 中,为 HTML 元素添加了 pointerEvents 样式,并修改了 innerHTML 的赋值方式。

我对代码进行了一些审查,并发现了一个潜在的类型安全问题。具体请看我的评论。

@moayuisuda moayuisuda merged commit fef14ad into master Nov 21, 2025
0 of 2 checks passed
@moayuisuda moayuisuda deleted the fix/axis-render branch November 21, 2025 10:07
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.

4 participants