Discover: fix fetch api on once. And switch Navbar done.

This commit is contained in:
chiayin
2023-03-03 17:16:36 +08:00
parent 8f2514cd5c
commit 35568fe095
5 changed files with 88 additions and 53 deletions

View File

@@ -5,13 +5,20 @@ import TimeLabel from '@/module/timeLabel.js'; // 時間格式轉換器
cytoscape.use( dagre );
export default function cytoscapeMap(mapData, mapType, dataLayerType, dataLayerOption, curveStyle, rank, graphId) {
// console.log(mapData);
// console.log(mapType);
// console.log(dataLayerType);
// console.log(dataLayerOption);
// console.log(curveStyle);
// console.log(rank);
/**
* @param {object} mapData processMapData | bpmnData
* mapData:{
* startId: 0,
* endId: 1,
* nodes: [],
* edges: []
* }
* @param {string} dataLayerType DataLayer's type
* @param {string} dataLayerOption DataLayer's options
* @param {string} curve Curve's type
* @param {string} graphId cytoscape's container
*/
export default function cytoscapeMap(mapData, dataLayerType, dataLayerOption, curveStyle, rank, graphId) {
// create color Gradient
// 設定每個 node, edges 的顏色與樣式
let gradientArray = [];
@@ -71,8 +78,7 @@ export default function cytoscapeMap(mapData, mapType, dataLayerType, dataLayerO
},
layout: {
name: 'dagre',
rankDir: rank, // 直向 TB | 橫向 LR, 'cytoscape-dagre' 裡的變數
rankDir: rank, // 直向 TB | 橫向 LR, 'cytoscape-dagre' 套件裡的變數
},
style: [
// 點擊 node 後改變的樣式