Skip to content

Commit

Permalink
fix: fix issue with hidden elements being displayed in optimize-viewp…
Browse files Browse the repository at this point in the history
…ort-transform (#6438)

* fix: fix issue with hidden elements being displayed in optimize-viewport-transform

* fix: update remarks

* fix: update remarks

* test: update unit tests
  • Loading branch information
yvonneyx authored Oct 28, 2024
1 parent 56a87d2 commit 86b9283
Show file tree
Hide file tree
Showing 6 changed files with 3,317 additions and 22 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import data from '@@/dataset/cluster.json';
import type { DisplayObject } from '@antv/g';
import type { ElementType } from '@antv/g6';
import { Graph } from '@antv/g6';

export const behaviorOptimizeViewportTransform: TestCase = async (context) => {
Expand All @@ -23,7 +25,17 @@ export const behaviorOptimizeViewportTransform: TestCase = async (context) => {
startArrow: true,
},
},
behaviors: ['drag-canvas', 'zoom-canvas', 'scroll-canvas', 'optimize-viewport-transform'],
behaviors: [
'drag-canvas',
'zoom-canvas',
'scroll-canvas',
{
key: 'optimize-viewport-transform',
type: 'optimize-viewport-transform',
shapes: (type: ElementType, shape: DisplayObject) => type === 'node' && shape.className === 'key',
},
],
animation: false,
});

await graph.render();
Expand Down
Loading

0 comments on commit 86b9283

Please sign in to comment.