diff --git a/src/graphics/sectionLink/SectionLink.ts b/src/graphics/sectionLink/SectionLink.ts index e1f9479..587308b 100644 --- a/src/graphics/sectionLink/SectionLink.ts +++ b/src/graphics/sectionLink/SectionLink.ts @@ -50,7 +50,7 @@ export class SectionLink extends JlGraphic implements ILineGraphic { this.labelGraphic = new VectorText(); this.labelGraphic.setVectorFontSize(14); this.labelGraphic.anchor.set(0.5); - this.labelGraphic.style.fill = '#0f0'; + this.labelGraphic.style.fill = '#ff0'; this.labelGraphic.transformSave = true; this.labelGraphic.name = 'label'; this.transformSave = true; diff --git a/src/graphics/sectionLink/SectionLinkDrawAssistant.ts b/src/graphics/sectionLink/SectionLinkDrawAssistant.ts index b21e671..53cc609 100644 --- a/src/graphics/sectionLink/SectionLinkDrawAssistant.ts +++ b/src/graphics/sectionLink/SectionLinkDrawAssistant.ts @@ -464,8 +464,16 @@ export class SectionLinkEditPlugin extends GraphicInteractionPlugin g.lineGraphic.eventMode = 'static'; g.lineGraphic.cursor = 'pointer'; g.lineGraphic.hitArea = new SectionLinkGraphicHitArea(g); + g.transformSave = true; + g.labelGraphic.eventMode = 'static'; + g.labelGraphic.cursor = 'pointer'; + g.labelGraphic.selectable = true; + g.labelGraphic.draggable = true; } unbind(g: SectionLink): void { - // console.log + g.transformSave = false; + g.labelGraphic.eventMode = 'none'; + g.labelGraphic.selectable = false; + g.labelGraphic.draggable = false; } }