右键菜单置灰调整

This commit is contained in:
fan 2023-07-21 14:04:29 +08:00
parent 293adda0d7
commit 5890ca71c4

View File

@ -81,6 +81,7 @@ export function destroyLineApp(): void {
const PhysicsOptions: MenuItemOptions = { const PhysicsOptions: MenuItemOptions = {
name: '物理图层', name: '物理图层',
disabled: true,
}; };
const linkOptions: MenuItemOptions = { const linkOptions: MenuItemOptions = {
name: 'Link图层', name: 'Link图层',
@ -164,6 +165,8 @@ export function initLineApp(dom: HTMLElement): GraphicApp {
g.visible = false; g.visible = false;
} }
}); });
linkOptions.disabled = false;
PhysicsOptions.disabled = true;
}; };
linkOptions.handler = () => { linkOptions.handler = () => {
alllGraphic.forEach((g) => { alllGraphic.forEach((g) => {
@ -173,7 +176,8 @@ export function initLineApp(dom: HTMLElement): GraphicApp {
g.visible = false; g.visible = false;
} }
}); });
console.log(lineApp); linkOptions.disabled = true;
PhysicsOptions.disabled = false;
}; };
DefaultCanvasMenu.open(e.global); DefaultCanvasMenu.open(e.global);
}); });