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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/g6-extension-3d/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g6-extension-3d",
"version": "0.1.12",
"version": "0.1.13",
"description": "3D extension for G6",
"keywords": [
"antv",
Expand Down
2 changes: 1 addition & 1 deletion packages/g6-extension-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g6-extension-react",
"version": "0.1.13",
"version": "0.1.14",
"description": "Using React Component to Define Your G6 Graph Node",
"keywords": [
"antv",
Expand Down
2 changes: 1 addition & 1 deletion packages/g6/__tests__/demos/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ export { pluginTimebar } from './plugin-timebar';
export { pluginToolbarBuildIn } from './plugin-toolbar-build-in';
export { pluginToolbarIconfont } from './plugin-toolbar-iconfont';
export { pluginTooltip } from './plugin-tooltip';
export { pluginTooltipAsync } from './plugin-tooltip-async';
export { pluginTooltipDual } from './plugin-tooltip-dual';
export { pluginTooltipEnable } from './plugin-tooltip-enable';
export { pluginTooltipAsync } from './plugin-tooltip-async';
export { pluginWatermark } from './plugin-watermark';
export { pluginWatermarkImage } from './plugin-watermark-image';
export { theme } from './theme';
Expand Down
6 changes: 2 additions & 4 deletions packages/g6/__tests__/demos/plugin-tooltip-async.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ export const pluginTooltipAsync: TestCase = async (context) => {
const graph = new Graph({
...context,
data: {
nodes: [
{ id: 'node1', style: { x: 150, y: 100 }, data: { desc: 'get content async test' } },
],
nodes: [{ id: 'node1', style: { x: 150, y: 100 }, data: { desc: 'get content async test' } }],
},
node: {
style: {
Expand All @@ -22,7 +20,7 @@ export const pluginTooltipAsync: TestCase = async (context) => {
getContent: (evt: IElementEvent, items: ElementDatum[]) => {
return new Promise((resolve) => {
resolve(items[0].data?.desc || '');
})
});
},
},
],
Expand Down
2 changes: 1 addition & 1 deletion packages/g6/__tests__/unit/plugins/tooltip.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Tooltip } from '@/src';
import { ComboEvent, EdgeEvent, NodeEvent, idOf } from '@/src';
import { pluginTooltip, pluginTooltipEnable, pluginTooltipAsync } from '@@/demos';
import { pluginTooltip, pluginTooltipAsync, pluginTooltipEnable } from '@@/demos';
import { createDemoGraph } from '@@/utils';

describe('plugin tooltip', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/g6/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/g6",
"version": "5.0.38",
"version": "5.0.39",
"description": "A Graph Visualization Framework in JavaScript",
"keywords": [
"antv",
Expand Down
2 changes: 1 addition & 1 deletion packages/g6/src/elements/nodes/html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.

x = offsetX;
y = offsetY;
} else {
Expand Down
2 changes: 1 addition & 1 deletion packages/g6/src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const version = '5.0.38';
export const version = '5.0.39';
Loading