psl按钮接口重复调用调整
This commit is contained in:
parent
62544cdafb
commit
3bf6e09acb
@ -1,6 +1,7 @@
|
||||
import { defineStore } from 'pinia';
|
||||
import { initPslScene } from 'src/drawApp/pslScene';
|
||||
import { getLineApp } from 'src/drawApp/lineApp';
|
||||
import { GraphicApp } from 'src/jl-graphic/app/JlGraphicApp';
|
||||
|
||||
export const usePslStore = defineStore('psl', {
|
||||
state: () => ({
|
||||
@ -10,10 +11,12 @@ export const usePslStore = defineStore('psl', {
|
||||
}),
|
||||
actions: {
|
||||
getPslScene() {
|
||||
const lineApp = getLineApp();
|
||||
const lineApp = getLineApp() as GraphicApp;
|
||||
if (!lineApp) return;
|
||||
const pslScene = initPslScene(lineApp, 'psl');
|
||||
return pslScene;
|
||||
if (lineApp.scenes.get('psl')) {
|
||||
return lineApp.getScene('psl');
|
||||
}
|
||||
return initPslScene(lineApp, 'psl');
|
||||
},
|
||||
setPslParam(gatedBoxId: string, pslMapCode: string) {
|
||||
this.gatedBoxId = gatedBoxId;
|
||||
|
Loading…
Reference in New Issue
Block a user