From 89e96294192b44ef3788bf4c5a6a486204f7474e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=8C=AF=E5=8D=87?= <359059686@qq.com> Date: Mon, 11 Jan 2021 08:55:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=BC=E5=AE=B9=E7=AE=AD=E5=A4=B4=E8=B0=83?= =?UTF-8?q?=E6=95=B4=E5=8E=9A=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/working-area/model/multipointIcon.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/app/working-area/model/multipointIcon.ts b/src/app/working-area/model/multipointIcon.ts index 395afd1..6ac0fc1 100644 --- a/src/app/working-area/model/multipointIcon.ts +++ b/src/app/working-area/model/multipointIcon.ts @@ -63,7 +63,7 @@ export class MultipointIcon extends AxShape { icon.x = pointA.x; icon.y = pointA.y; icon.angle = angle; - // icon.height = this.assetData.Thickness === 0 ? 32 : this.assetData.Thickness; + icon.scale.set(1,this.assetData.Thickness === 0 ? 32/64 : this.assetData.Thickness/64); this.iconsTilingSprite.push(icon); this.addChild(icon); this.text.position = this.getLineCenter(this.pointsData[0], this.pointsData[1]); @@ -192,10 +192,9 @@ export class MultipointIcon extends AxShape { } // 刷新数据 public refresh() { - // console.log(this.assetData); - // this.iconsTilingSprite.forEach(element => { - // element.height = this.assetData.Thickness === 0 ? 32 : this.assetData.Thickness; - // }); + this.iconsTilingSprite.forEach(element => { + element.scale.set(1,this.assetData.Thickness === 0 ? 32/64 : this.assetData.Thickness/64); + }); this.text.text = this.assetData.Name + '\r\n' + this.assetData.PropertyInfos.find(item => item.PropertyName === '名称/编号')?.PropertyValue;