线路图增加逻辑区段显示

This commit is contained in:
Yuan 2023-07-21 11:22:01 +08:00
parent 5b1fcbf585
commit ff48652c3e

View File

@ -59,6 +59,8 @@ let msgBroker: AppWsMsgBroker | null = null;
import { ContextMenu } from 'src/jl-graphic/ui/ContextMenu';
import { MenuItemOptions } from 'src/jl-graphic/ui/Menu';
import { LogicSectionTemplate } from 'src/graphics/logicSection/LogicSection';
import { LogicSectionData } from './graphics/LogicSectionInteraction';
// const QuickJumpMenu = new ContextMenu({
// name: '快捷跳转',
@ -93,6 +95,7 @@ export function initLineApp(dom: HTMLElement): GraphicApp {
new StationTemplate(new StationData(), new StationState()),
new TurnoutTemplate(new TurnoutData(), new TurnoutStates()),
new SectionTemplate(new SectionData()),
new LogicSectionTemplate(new LogicSectionData()),
new SeparatorTemplate(new SeparatorData()),
new AxleCountingTemplate(new AxleCountingData()),
new TrainWindowTemplate(new TrainWindowData()),
@ -168,6 +171,9 @@ export async function loadLineDatas(app: GraphicApp) {
storage.section.forEach((section) => {
datas.push(new SectionData(section));
});
storage.logicSections.forEach((section) => {
datas.push(new LogicSectionData(section));
});
storage.separators.forEach((separator) => {
datas.push(new SeparatorData(separator));
});