切换场景,右键bug修复
This commit is contained in:
parent
decd348c04
commit
5cf29df992
@ -92,8 +92,8 @@ export class RelayState extends GraphicStateBase implements IRelayState {
|
|||||||
const setOpen: MenuItemOptions = { name: '驱动落下' };
|
const setOpen: MenuItemOptions = { name: '驱动落下' };
|
||||||
const setClose: MenuItemOptions = { name: '驱动吸起' };
|
const setClose: MenuItemOptions = { name: '驱动吸起' };
|
||||||
|
|
||||||
const RelayOperationMenu: ContextMenu = ContextMenu.init({
|
export const RelayOperationMenu: ContextMenu = ContextMenu.init({
|
||||||
name: 'Turnout操作',
|
name: 'Relay操作',
|
||||||
groups: [{ items: [setOpen, setClose] }],
|
groups: [{ items: [setOpen, setClose] }],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -59,6 +59,7 @@ import { ApiError } from 'src/boot/axios';
|
|||||||
import { layerList } from 'src/drawApp/lineScene';
|
import { layerList } from 'src/drawApp/lineScene';
|
||||||
import { IGraphicScene } from 'src/jl-graphic';
|
import { IGraphicScene } from 'src/jl-graphic';
|
||||||
import { ISceneName, getSceneName } from 'src/drawApp/lineApp';
|
import { ISceneName, getSceneName } from 'src/drawApp/lineApp';
|
||||||
|
import { RelayOperationMenu } from 'src/drawApp/relayCabinetGraphics/RelayInteraction';
|
||||||
|
|
||||||
const $q = useQuasar();
|
const $q = useQuasar();
|
||||||
const canvasWidth = ref(0);
|
const canvasWidth = ref(0);
|
||||||
@ -191,6 +192,7 @@ function switchScene(val: MapInfo) {
|
|||||||
sceneName = getSceneNameFn(val);
|
sceneName = getSceneNameFn(val);
|
||||||
lineStore.setSceneName(sceneName);
|
lineStore.setSceneName(sceneName);
|
||||||
scene = lineApp.getScene(sceneName);
|
scene = lineApp.getScene(sceneName);
|
||||||
|
scene.registerMenu(RelayOperationMenu);
|
||||||
const dom = document.getElementById('line-app-container');
|
const dom = document.getElementById('line-app-container');
|
||||||
if (dom) {
|
if (dom) {
|
||||||
scene.bindDom(dom);
|
scene.bindDom(dom);
|
||||||
|
Loading…
Reference in New Issue
Block a user