修正 spriteIconUrl 的路徑,移除多餘的 /dist,並更新 useHeatmapBarStore 的 API 路徑設定,簡化為統一的 /config.json
This commit is contained in:
parent
e45ac790a6
commit
4b210fa19f
@ -94,7 +94,7 @@ const createSprites = async (dataVizExtn) => {
|
|||||||
const viewableType = DataVizCore.ViewableType.SPRITE;
|
const viewableType = DataVizCore.ViewableType.SPRITE;
|
||||||
let spriteColor = new THREE.Color(0xffffff);
|
let spriteColor = new THREE.Color(0xffffff);
|
||||||
const BASEURL = window.env?.VITE_FILE_API_BASEURL;
|
const BASEURL = window.env?.VITE_FILE_API_BASEURL;
|
||||||
const spriteIconUrl = `${BASEURL}/dist/hotspot.svg`;
|
const spriteIconUrl = `${BASEURL}/hotspot.svg`;
|
||||||
const style = new DataVizCore.ViewableStyle(
|
const style = new DataVizCore.ViewableStyle(
|
||||||
viewableType,
|
viewableType,
|
||||||
spriteColor,
|
spriteColor,
|
||||||
|
@ -90,7 +90,7 @@ export default function useForgeSprite() {
|
|||||||
const viewableType = DataVizCore.ViewableType.SPRITE;
|
const viewableType = DataVizCore.ViewableType.SPRITE;
|
||||||
let spriteColor = new THREE.Color(0xffffff);
|
let spriteColor = new THREE.Color(0xffffff);
|
||||||
const BASEURL = window.env?.VITE_FILE_API_BASEURL;
|
const BASEURL = window.env?.VITE_FILE_API_BASEURL;
|
||||||
const spriteIconUrl = `${BASEURL}/dist/hotspot.svg`;
|
const spriteIconUrl = `${BASEURL}/hotspot.svg`;
|
||||||
const viewableData = new DataVizCore.ViewableData();
|
const viewableData = new DataVizCore.ViewableData();
|
||||||
viewableData.spriteSize = 24; // Sprites as points of size 24 x 24 pixels
|
viewableData.spriteSize = 24; // Sprites as points of size 24 x 24 pixels
|
||||||
flatSubData.value?.forEach((d, index) => {
|
flatSubData.value?.forEach((d, index) => {
|
||||||
|
@ -10,10 +10,7 @@ const useHeatmapBarStore = defineStore("heatmap", () => {
|
|||||||
const heatmapConfig = computed(() => allHeatMaps.value[route.query?.gas]);
|
const heatmapConfig = computed(() => allHeatMaps.value[route.query?.gas]);
|
||||||
|
|
||||||
const getConfig = async () => {
|
const getConfig = async () => {
|
||||||
const api =
|
const api = "/config.json";
|
||||||
import.meta.env.MODE === "production"
|
|
||||||
? "/dist/config.json"
|
|
||||||
: "/config.json";
|
|
||||||
const res = await axios.get(api);
|
const res = await axios.get(api);
|
||||||
console.log(res);
|
console.log(res);
|
||||||
allHeatMaps.value = res.data.heatmap;
|
allHeatMaps.value = res.data.heatmap;
|
||||||
|
Loading…
Reference in New Issue
Block a user