sectionLink编号颜色&拖动调整
This commit is contained in:
parent
072b44be90
commit
8b763fa671
@ -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;
|
||||
|
@ -464,8 +464,16 @@ export class SectionLinkEditPlugin extends GraphicInteractionPlugin<SectionLink>
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user