规范化操作

This commit is contained in:
wzy-warehouse
2026-04-18 17:34:46 +08:00
parent da7745b7a9
commit f3fd716352
8 changed files with 107 additions and 62 deletions
+24
View File
@@ -0,0 +1,24 @@
import { useStatusStore } from '@/stores/useStatusStore';
import { CesiumUtilsSingleton } from '@/utils/cesium/CesiumUtils';
import config from '@/config/config.json';
export const useRightHandle = () => {
/**
* 重置场景
*/
const resetScene = () => {
CesiumUtilsSingleton.clearAllResources('custom');
useStatusStore().resetScene();
};
/**
* 重置视角
*/
const resetView = () => {
CesiumUtilsSingleton.flyToTarget(
config.defaultPosition as [number, number, number]
);
};
return { resetScene, resetView };
};