Skip to content

Commit

Permalink
- bug(behaviorConfig)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisGray0626 committed Jul 1, 2024
1 parent e58f8a2 commit 0a35235
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/G6/behaviorConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {IG6GraphEvent} from "@antv/g6-core/lib/types";
import {BehaviorOption} from "@antv/g6";
import {useNodeStore} from "@/store/node.ts";
import pinia from "@/store";
import {INode} from "@antv/g6-core/lib/interface/item";

const nodeStore = useNodeStore(pinia);

Expand All @@ -12,8 +13,8 @@ export const activateNodeBehavior: BehaviorOption = {
};
},
async onNodeClick(evt: IG6GraphEvent) {
const node = evt.item;
console.log(node?.getModel().id);
await nodeStore.updateData(node?.getModel())
const node: INode = evt.item;

Check failure on line 16 in src/G6/behaviorConfig.ts

View workflow job for this annotation

GitHub Actions / build (18.x, chrisgray0626/gis-agent-frontend, 0.1)

Type 'Item | null' is not assignable to type 'INode'.
console.log(node.getModel().id);
await nodeStore.updateData(node.getModel())

Check failure on line 18 in src/G6/behaviorConfig.ts

View workflow job for this annotation

GitHub Actions / build (18.x, chrisgray0626/gis-agent-frontend, 0.1)

Argument of type 'TreeGraphData | NodeConfig | EdgeConfig | ComboConfig' is not assignable to parameter of type 'NodeConfig'.
},
};

0 comments on commit 0a35235

Please sign in to comment.