diff --git a/src/drawApp/lineNetApp.ts b/src/drawApp/lineNetApp.ts index b4b4cac..adaccba 100644 --- a/src/drawApp/lineNetApp.ts +++ b/src/drawApp/lineNetApp.ts @@ -123,6 +123,7 @@ export function initLineNetApp(): IGraphicApp { }); lineNetApp.subscribe({ destination: '/queue/lineNet', + messageConverter: (message: Uint8Array) => { const storage = state.WsLineNetMessage.deserialize(message); const states: GraphicState[] = []; diff --git a/src/graphics/section/SectionDrawAssistant.ts b/src/graphics/section/SectionDrawAssistant.ts index 1a82c3d..a4b8ec7 100644 --- a/src/graphics/section/SectionDrawAssistant.ts +++ b/src/graphics/section/SectionDrawAssistant.ts @@ -485,10 +485,11 @@ export class SectionPointEditPlugin extends GraphicInteractionPlugin
{ } points.forEach((ps, i) => { const data = new LogicSectionData(); - const logicSectionDA = this.drawAssistant.app.drawAssistants.find( - (da) => da instanceof LogicSectionDraw - ) as LogicSectionDraw; - data.id = logicSectionDA.nextId(); + const logicSectionDraw = + this.drawAssistant.app.getDrawAssistant( + LogicSection.Type + ); + data.id = logicSectionDraw.nextId(); data.code = `${sectionData.code}-${codeAppend.charAt(i % 26)}`; data.points = ps.map( (p) => new graphicData.Point({ x: p.x, y: p.y }) @@ -512,9 +513,9 @@ export class SectionPointEditPlugin extends GraphicInteractionPlugin
{ ) ), ]; - const g = logicSectionDA.graphicTemplate.new(); + const g = logicSectionDraw.graphicTemplate.new(); g.loadData(data); - logicSectionDA.storeGraphic(g); + logicSectionDraw.storeGraphic(g); children.push(g); }); sectionData.children = children.map((g) => g.datas.id); diff --git a/src/pages/LineMonitorPage.vue b/src/pages/LineMonitorPage.vue index 7013df8..4c3d40f 100644 --- a/src/pages/LineMonitorPage.vue +++ b/src/pages/LineMonitorPage.vue @@ -16,7 +16,6 @@ import { useLineStore } from 'src/stores/line-store'; import { useRoute } from 'vue-router'; import { useLineNetStore } from 'src/stores/line-net-store'; import StateProperties from 'src/components/state-app/StateProperties.vue'; -import { JlGraphic } from 'src/jl-graphic'; const props = withDefaults( defineProps<{