diff --git a/packages/g6/__tests__/demos/behavior-click-select.ts b/packages/g6/__tests__/demos/behavior-click-select.ts index c8392ed5212..94de26b63e1 100644 --- a/packages/g6/__tests__/demos/behavior-click-select.ts +++ b/packages/g6/__tests__/demos/behavior-click-select.ts @@ -30,7 +30,7 @@ export const behaviorClickSelect: TestCase = async (context) => { .name('Multiple') .onChange((multiple: boolean) => updateClickSelectOption({ multiple })), panel - .add(config, 'trigger', ['shift', 'ctrl', 'alt', 'meta']) + .add(config, 'trigger', ['Shift', 'Control', 'Alt', 'Meta']) .name('Trigger') .onChange((trigger: string) => updateClickSelectOption({ trigger: [trigger] })), panel diff --git a/packages/site/examples/behavior/select/demo/brush.js b/packages/site/examples/behavior/select/demo/brush.js index e1b65a948e8..bbd12a5a44a 100644 --- a/packages/site/examples/behavior/select/demo/brush.js +++ b/packages/site/examples/behavior/select/demo/brush.js @@ -34,7 +34,7 @@ const graph = new Graph({ graph.render(); window.addPanel((gui) => { - gui.add({ trigger: 'shift' }, 'trigger', ['shift', 'alt', 'ctrl', 'drag', 'meta']).onChange((value) => { + gui.add({ trigger: 'shift' }, 'trigger', ['Shift', 'Alt', 'Control', 'Drag', 'Meta']).onChange((value) => { graph.updateBehavior({ key: 'brush-select', trigger: value }); }); }); diff --git a/packages/site/examples/behavior/select/demo/lasso.js b/packages/site/examples/behavior/select/demo/lasso.js index 75584385e36..fbeb1b94117 100644 --- a/packages/site/examples/behavior/select/demo/lasso.js +++ b/packages/site/examples/behavior/select/demo/lasso.js @@ -35,7 +35,7 @@ const graph = new Graph({ graph.render(); window.addPanel((gui) => { - gui.add({ trigger: 'shift' }, 'trigger', ['shift', 'alt', 'ctrl', 'drag', 'meta']).onChange((value) => { + gui.add({ trigger: 'shift' }, 'trigger', ['Shift', 'Alt', 'Control', 'Drag', 'Meta']).onChange((value) => { graph.updateBehavior({ key: 'lasso-select', trigger: value }); }); }); diff --git a/packages/site/examples/layout/dagre/demo/antv-dagre.js b/packages/site/examples/layout/dagre/demo/antv-dagre.js index 444a02ea0e0..ed9499e70b7 100644 --- a/packages/site/examples/layout/dagre/demo/antv-dagre.js +++ b/packages/site/examples/layout/dagre/demo/antv-dagre.js @@ -29,10 +29,8 @@ const data = { ], }; -const container = document.getElementById('container'); - const graph = new Graph({ - container, + container: 'container', animation: false, data, layout: { @@ -42,8 +40,8 @@ const graph = new Graph({ controlPoints: true, }, node: { + type: 'rect', style: { - type: 'rect', size: [60, 30], radius: 8, labelPlacement: 'center',