From 75b4705a28589ad45e466fd99af4acf6a06997f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=8C=AF=E5=8D=87?= <359059686@qq.com> Date: Tue, 12 Jan 2021 16:20:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/working-area/model/axLegend.ts | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) 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);