diff --git a/src/app/working-area/working-area.component.ts b/src/app/working-area/working-area.component.ts index c9ab928..9891df1 100644 --- a/src/app/working-area/working-area.component.ts +++ b/src/app/working-area/working-area.component.ts @@ -817,11 +817,27 @@ enum PaintMode { * 单点图标 */ export class SinglePointIcon extends PIXI.Container { + style = new PIXI.TextStyle({ + fontFamily: 'Arial', + fontSize: 18, + fontStyle: 'normal', + fontWeight: 'bold', + fill: ['#000000'], + stroke: '#00ff99', + strokeThickness: 3, + dropShadow: true, + dropShadowColor: '#000000', + dropShadowBlur: 3, + dropShadowAngle: Math.PI / 6, + dropShadowDistance: 1, + wordWrap: false, + wordWrapWidth: 100, + }); + private text = new PIXI.Text(this.assetData.Name + '\r\n' - + this.assetData.PropertyInfos.find(item => item.PropertyName === '名称/编号')?.PropertyValue, { - fontFamily: 'Arial', fontSize: 18, fill: 0xffffff, align: 'center' - }); + + this.assetData.PropertyInfos.find(item => item.PropertyName === '名称/编号')?.PropertyValue, this.style); + constructor(public assetData: any, private workingArea: WorkingAreaComponent) { super(); this.workingArea.backgroundImage.addChild(this); @@ -897,9 +913,26 @@ export class MultipointIcon extends PIXI.Container { public pointsData: PIXI.Point[]; public pointsGraphics: PIXI.Graphics[] = []; public iconsTilingSprite: PIXI.TilingSprite[] = []; - private text = new PIXI.Text(this.assetData.Name, { - fontFamily: 'Arial', fontSize: 18, fill: 0xffffff, align: 'center' + style = new PIXI.TextStyle({ + fontFamily: 'Arial', + fontSize: 18, + fontStyle: 'normal', + fontWeight: 'bold', + fill: ['#000000'], + stroke: '#00ff99', + strokeThickness: 3, + dropShadow: true, + dropShadowColor: '#000000', + dropShadowBlur: 3, + dropShadowAngle: Math.PI / 6, + dropShadowDistance: 1, + wordWrap: false, + wordWrapWidth: 100, }); + + private text = new PIXI.Text(this.assetData.Name + + '\r\n' + + this.assetData.PropertyInfos.find(item => item.PropertyName === '名称/编号')?.PropertyValue, this.style); /** * * @param texture 图片素材 @@ -1097,9 +1130,26 @@ export class PolygonIcon extends PIXI.Container { public pointsGraphics: PIXI.Graphics[] = []; public polygonGraphics: PIXI.Graphics = new PIXI.Graphics(); public polygonLineGraphics: PIXI.Graphics = new PIXI.Graphics(); - private text = new PIXI.Text(this.assetData.Name, { - fontFamily: 'Arial', fontSize: 18, fill: 0xffffff, align: 'center' + style = new PIXI.TextStyle({ + fontFamily: 'Arial', + fontSize: 18, + fontStyle: 'normal', + fontWeight: 'bold', + fill: ['#000000'], + stroke: '#00ff99', + strokeThickness: 3, + dropShadow: true, + dropShadowColor: '#000000', + dropShadowBlur: 3, + dropShadowAngle: Math.PI / 6, + dropShadowDistance: 1, + wordWrap: false, + wordWrapWidth: 100, }); + + private text = new PIXI.Text(this.assetData.Name + + '\r\n' + + this.assetData.PropertyInfos.find(item => item.PropertyName === '名称/编号')?.PropertyValue, this.style); /** * * @param points 点集合