Compare commits
2 Commits
7c1ea16fce
...
1ac34663fb
Author | SHA1 | Date | |
---|---|---|---|
|
1ac34663fb | ||
|
4012e3c2f7 |
@ -246,7 +246,7 @@ watch(
|
|||||||
if (!container) return;
|
if (!container) return;
|
||||||
const pslScene = pslStore.getPslScene();
|
const pslScene = pslStore.getPslScene();
|
||||||
pslScene?.bindDom(container);
|
pslScene?.bindDom(container);
|
||||||
await pslScene?.forceReload();
|
await pslScene?.reload();
|
||||||
if (pslScene) {
|
if (pslScene) {
|
||||||
pslCanvasWidth.value = pslScene.canvas.width;
|
pslCanvasWidth.value = pslScene.canvas.width;
|
||||||
pslCanvasHeight.value = pslScene.canvas.height;
|
pslCanvasHeight.value = pslScene.canvas.height;
|
||||||
|
@ -12,12 +12,8 @@ export const usePslStore = defineStore('psl', {
|
|||||||
getPslScene() {
|
getPslScene() {
|
||||||
const lineApp = getLineApp();
|
const lineApp = getLineApp();
|
||||||
if (!lineApp) throw Error('未初始化app');
|
if (!lineApp) throw Error('未初始化app');
|
||||||
try {
|
lineApp.removeScene('psl');
|
||||||
return lineApp.getScene('psl');
|
return initPslScene(lineApp, 'psl');
|
||||||
} catch (error) {
|
|
||||||
const pslScene = initPslScene(lineApp, 'psl');
|
|
||||||
return pslScene;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
setPslParam(pslId: number, pslMapCode: string) {
|
setPslParam(pslId: number, pslMapCode: string) {
|
||||||
this.pslId = pslId;
|
this.pslId = pslId;
|
||||||
|
Loading…
Reference in New Issue
Block a user