diff --git a/src/app/working-area/model/axLegend.ts b/src/app/working-area/model/axLegend.ts index 60d8a7d..56a67c5 100644 --- a/src/app/working-area/model/axLegend.ts +++ b/src/app/working-area/model/axLegend.ts @@ -32,6 +32,7 @@ export class AxLegend extends AxShape { this.y = this.assetData.Point.y; this.scale.set(this.assetData.Scale); this.shapeMap = shapeMap; + this.createPoint(); this.refresh(); } // 添加数据 @@ -119,6 +120,16 @@ export class AxLegend extends AxShape { this.addChild(this.border); // 添加控制点 this.addChild(this.upLeft); + this.addChild(this.upRight); + this.addChild(this.downLeft); + this.addChild(this.downRight); + + + this.angle = -this.workingArea.backgroundImage.angle; + this.drawBorder(1 / this.workingArea.backgroundImage.scale.x); + } + public createPoint() { + // this.addChild(this.upLeft); this.upLeft.anchor.set(0.5); this.upLeft.interactive = true; this.upLeft.visible = false; @@ -186,7 +197,7 @@ export class AxLegend extends AxShape { .on('rightclick', event => { this.border.visible = false; }); - this.addChild(this.upRight); + // this.addChild(this.upRight); this.upRight.anchor.set(0.5); this.upRight.interactive = true; this.upRight.visible = false; @@ -254,7 +265,7 @@ export class AxLegend extends AxShape { .on('rightclick', event => { this.border.visible = false; }); - this.addChild(this.downLeft); + // this.addChild(this.downLeft); this.downLeft.anchor.set(0.5); this.downLeft.interactive = true; this.downLeft.visible = false; @@ -322,7 +333,7 @@ export class AxLegend extends AxShape { .on('rightclick', event => { this.border.visible = false; }); - this.addChild(this.downRight); + // this.addChild(this.downRight); this.downRight.anchor.set(0.5); this.downRight.interactive = true; this.downRight.visible = false; @@ -390,7 +401,6 @@ export class AxLegend extends AxShape { .on('rightclick', event => { this.border.visible = false; }); - this.angle = -this.workingArea.backgroundImage.angle; } /** * 设置点显示状态 @@ -417,6 +427,7 @@ export class AxLegend extends AxShape { */ public drawBorder(scale: number) { let visible = this.upLeft.visible; + console.log(visible); this.setPointVisiable(false); super.drawBorder(scale);