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