-
Notifications
You must be signed in to change notification settings - Fork 209
Release #1916
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
Conversation
Co-authored-by: huiyu.zjt <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Walkthrough: This pull request introduces a new test case related to issue #1911, updates several package dependencies, and includes minor changes to the rendering logic in the Changes:
🪧 TipsFor further assistance, please describe your question in the comments and @petercat-assistant to start a conversation with me. |
if (dx !== 0 || dy !== 0) { | ||
styleCSSText += `transform:translate(${dx}px, ${dy}px);`; | ||
} | ||
let styleCSSText = `transform:translate(${dx}px, ${dy}px);`; |
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.
The change in styleCSSText
initialization to always include transform:translate(${dx}px, ${dy}px);
may introduce unintended transformations when dx
and dy
are zero. Consider adding a condition to avoid unnecessary transformations.
@@ -0,0 +1,104 @@ | |||
import { Canvas, Text, Rect, CanvasEvent } from '@antv/g'; |
Check notice
Code scanning / CodeQL
Unused variable, import, function or class Note test
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 21 days ago
To fix the problem, we need to remove the unused Canvas
import from the import statement on line 1. This will clean up the code and eliminate the unnecessary import, improving readability and potentially performance.
- Remove the
Canvas
import from the import statement on line 1. - Ensure that the remaining imports are still correctly formatted and used in the code.
-
Copy modified line R1
@@ -1,2 +1,2 @@ | ||
import { Canvas, Text, Rect, CanvasEvent } from '@antv/g'; | ||
import { Text, Rect, CanvasEvent } from '@antv/g'; | ||
import { Renderer as SVGRenderer } from '@antv/g-svg'; |
No description provided.