Skip to content

Commit

Permalink
refactor: remove supportsCSSTransform check (#6662)
Browse files Browse the repository at this point in the history
* refactor: remove supportsCSSTransform check

* chore: update version

* style: fix lint
  • Loading branch information
Aarebecca authored Dec 23, 2024
1 parent 2c2950b commit aaab73a
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 11 deletions.
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)) {
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';

0 comments on commit aaab73a

Please sign in to comment.