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

refactor: remove supportsCSSTransform check #6662

Merged
merged 3 commits into from
Dec 23, 2024
Merged

refactor: remove supportsCSSTransform check #6662

merged 3 commits into from
Dec 23, 2024

Conversation

Aarebecca
Copy link
Contributor

No description provided.

@Aarebecca Aarebecca added the publish PR merges with this tag will perform the publication label Dec 23, 2024
Copy link

Walkthrough

This pull request refactors the code by removing the supportsCSSTransform check from the conditional statement in the html.ts file. This change simplifies the condition by only checking if offsetX and offsetY are not nil. Additionally, the version number in version.ts is incremented from 5.0.38 to 5.0.39. Minor updates are also made to package.json files across different packages.

Changes

Files Summary
packages/g6-extension-3d/package.json, packages/g6-extension-react/package.json, packages/g6/package.json Minor updates to package.json files.
packages/g6/src/elements/nodes/html.ts Removed supportsCSSTransform check from a conditional statement.
packages/g6/src/version.ts Updated version number from 5.0.38 to 5.0.39.

@@ -268,7 +268,7 @@ export class HTML extends BaseNode<HTMLStyleProps> {
let x: number;
let y: number;
const { offsetX, offsetY, clientX, clientY } = nativeEvent;
if (this.context.canvas.context.config.supportsCSSTransform && !isNil(offsetX) && !isNil(offsetY)) {
if (!isNil(offsetX) && !isNil(offsetY)) {

Choose a reason for hiding this comment

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

The removal of supportsCSSTransform check may have implications if there are scenarios where this flag was necessary for certain environments or configurations. Ensure that this change does not affect any specific use cases that relied on this check.

@Aarebecca Aarebecca merged commit aaab73a into v5 Dec 23, 2024
2 checks passed
@Aarebecca Aarebecca deleted the fix/types branch December 23, 2024 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
publish PR merges with this tag will perform the publication
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants