Skip to content

Commit

Permalink
fix: fix site demo (#6521)
Browse files Browse the repository at this point in the history
* fix: fix event demo

* fix: fix site demo

---------

Co-authored-by: antv <[email protected]>
  • Loading branch information
Aarebecca and antv authored Nov 15, 2024
1 parent a24fa6e commit 4fd2afd
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/g6/__tests__/demos/perf-20000-elements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const perf20000Elements: TestCase = async (context) => {
});

console.time('time');
await graph.draw();
await graph.render();
console.timeEnd('time');

perf20000Elements.form = (gui) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/site/examples/behavior/inner-event/demo/basic.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ graph.render();

graph.on(NodeEvent.CLICK, (event) => {
const { target, originalTarget } = event;
if (originalTarget.id === 'light') {
if (originalTarget.className === 'light') {
graph.updateNodeData([{ id: target.id, states: ['selected'], style: { labelText: 'Clicked!' } }]);
graph.draw();
}
Expand Down
2 changes: 1 addition & 1 deletion packages/site/examples/feature/default/demo/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ fetch('https://assets.antv.antgroup.com/g6/20000.json')
plugins: [{ type: 'background', background: '#fff' }],
});

graph.draw();
graph.render();

window.addPanel((gui) => {
gui.add({ theme: '🌞 Light' }, 'theme', Object.keys(themes)).onChange((theme) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ fetch('https://assets.antv.antgroup.com/g6/20000.json')
behaviors: ['zoom-canvas', 'drag-canvas'],
});

graph.draw();
graph.render();
});
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ fetch('https://assets.antv.antgroup.com/g6/5000.json')
autoFit: 'view',
});

await graph.draw();
await graph.render();
});
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ fetch('https://assets.antv.antgroup.com/g6/60000.json')
behaviors: ['zoom-canvas', 'drag-canvas'],
});

graph.draw();
graph.render();
});

0 comments on commit 4fd2afd

Please sign in to comment.