Skip to content

Commit

Permalink
docs: fix demos (#5974)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aarebecca authored Jul 3, 2024
1 parent cc15c08 commit ef2645f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/g6/__tests__/demos/behavior-click-select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/site/examples/behavior/select/demo/brush.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
});
});
2 changes: 1 addition & 1 deletion packages/site/examples/behavior/select/demo/lasso.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
});
});
6 changes: 2 additions & 4 deletions packages/site/examples/layout/dagre/demo/antv-dagre.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,8 @@ const data = {
],
};

const container = document.getElementById('container');

const graph = new Graph({
container,
container: 'container',
animation: false,
data,
layout: {
Expand All @@ -42,8 +40,8 @@ const graph = new Graph({
controlPoints: true,
},
node: {
type: 'rect',
style: {
type: 'rect',
size: [60, 30],
radius: 8,
labelPlacement: 'center',
Expand Down

0 comments on commit ef2645f

Please sign in to comment.