Standardize store exports to named useXxxStore convention
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,9 +5,9 @@ import fcose from 'cytoscape-fcose';
|
||||
import cola from 'cytoscape-cola';
|
||||
import tippy from 'tippy.js';
|
||||
import 'tippy.js/dist/tippy.css';
|
||||
import MapPathStore from '@/stores/mapPathStore';
|
||||
import { useMapPathStore } from '@/stores/mapPathStore';
|
||||
import { getTimeLabel } from '@/module/timeLabel.js'; // 時間格式轉換器
|
||||
import CytoscapeStore from '@/stores/cytoscapeStore';
|
||||
import { useCytoscapeStore } from '@/stores/cytoscapeStore';
|
||||
import { SAVE_KEY_NAME } from '@/constants/constants.js';
|
||||
|
||||
const composeFreqTypeText = (baseText, dataLayerOption, optionValue) => { //sonar-qube
|
||||
@@ -232,12 +232,12 @@ export default function cytoscapeMap(mapData, dataLayerType, dataLayerOption, cu
|
||||
|
||||
// 按下節點光暈效果與鄰邊光暈效果
|
||||
cy.on('tap, mousedown', 'node', function (event) {
|
||||
MapPathStore().onNodeClickHighlightEdges(event.target);
|
||||
useMapPathStore().onNodeClickHighlightEdges(event.target);
|
||||
});
|
||||
|
||||
// 按下線段光暈效果與兩端點光暈效果
|
||||
cy.on('tap, mousedown', 'edge', function (event) {
|
||||
MapPathStore().onEdgeClickHighlightNodes(event.target);
|
||||
useMapPathStore().onEdgeClickHighlightNodes(event.target);
|
||||
});
|
||||
|
||||
// creat tippy.js
|
||||
@@ -260,7 +260,7 @@ export default function cytoscapeMap(mapData, dataLayerType, dataLayerOption, cu
|
||||
});
|
||||
|
||||
// here we remember and recall positions
|
||||
const cytoscapeStore = CytoscapeStore();
|
||||
const cytoscapeStore = useCytoscapeStore();
|
||||
cy.ready(() => {
|
||||
cytoscapeStore.loadPositionsFromStorage(rank);
|
||||
// 判斷localStorage是否儲存過拜訪資訊
|
||||
|
||||
Reference in New Issue
Block a user