图层-物理区段

This commit is contained in:
joylink_zhaoerwei 2023-07-26 09:32:37 +08:00
parent 7a8bf4cce1
commit 86d37f6146

View File

@ -118,6 +118,9 @@ const SelectAllOptions: MenuItemOptions = {
const AllOptions: MenuItemOptions = {
name: '全部图层',
};
const physicalSection: MenuItemOptions = {
name: '图层-物理区段',
};
const linkOptions: MenuItemOptions = {
name: '图层-Link',
};
@ -147,6 +150,7 @@ const layerOptions: MenuItemOptions = {
name: '图层菜单',
items: [
AllOptions,
physicalSection,
linkOptions,
axleCountingSectionOptions,
LogicSectionOptions,
@ -293,6 +297,17 @@ export function initDrawApp(dom: HTMLElement): JlDrawApp {
g.visible = true;
});
};
physicalSection.handler = () => {
disvisibleGraphics.forEach((g) => {
g.visible = false;
});
sections.forEach((axleCountingSection) => {
axleCountingSection.visible = true;
});
turnouts.forEach((axleCountingSection) => {
axleCountingSection.visible = true;
});
};
linkOptions.handler = () => {
disvisibleGraphics.forEach((g) => {
g.visible = false;