fix first index of mapGraphPathToInsight nested object

This commit is contained in:
Cindy Chang
2024-08-27 16:32:52 +08:00
parent 554411ace1
commit 63743280f6
3 changed files with 17 additions and 18 deletions

View File

@@ -402,7 +402,7 @@ export default {
* create cytoscape's map
* @param {string} type this.mapType 'processMap' | 'bpmn',可傳入以上任一。
*/
createCy(type) {
async createCy(type) {
let graphId = document.getElementById('cy');
let mapData = type === 'processMap'? this.processMapData: this.bpmnData;
@@ -410,7 +410,7 @@ export default {
this.setNodesData(mapData);
this.setEdgesData(mapData);
this.setActivityBgImage(mapData);
this.cytoscapeGraph = cytoscapeMap(mapData, this.dataLayerType, this.dataLayerOption, this.curveStyle, this.rank, graphId);
this.cytoscapeGraph = await cytoscapeMap(mapData, this.dataLayerType, this.dataLayerOption, this.curveStyle, this.rank, graphId);
};
},
setActivityBgImage(mapData) {
@@ -484,7 +484,7 @@ export default {
// log、filter 檔切換過程中, trace id 不同,將初始 trace id 設定為該檔案的 trace 幣一筆資料的 id。
this.traceId = await this.traces[0]?.id;
this.baseTraceId = await this.baseTraces[0]?.id;
this.createCy(this.mapType);
await this.createCy(this.mapType);
await mapPathStore.setCytoscape(this.cytoscapeGraph);
await mapPathStore.createPaths();
await mapPathStore.highlightMostFrequentPath();