|
|
|
@ -817,7 +817,9 @@ enum PaintMode {
|
|
|
|
|
* 单点图标 |
|
|
|
|
*/ |
|
|
|
|
export class SinglePointIcon extends PIXI.Container { |
|
|
|
|
private text = new PIXI.Text(this.assetData.Name, { |
|
|
|
|
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' |
|
|
|
|
}); |
|
|
|
|
constructor(public assetData: any, private workingArea: WorkingAreaComponent) { |
|
|
|
@ -838,7 +840,7 @@ export class SinglePointIcon extends PIXI.Container {
|
|
|
|
|
singlePointIcon |
|
|
|
|
.on('mousedown', event => { |
|
|
|
|
event.stopPropagation(); |
|
|
|
|
|
|
|
|
|
console.log(this.assetData); |
|
|
|
|
event.currentTarget.parent.data = event.data; |
|
|
|
|
event.currentTarget.parent.alpha = 0.5; |
|
|
|
|
event.currentTarget.parent.dragging = true; |
|
|
|
@ -875,8 +877,8 @@ export class SinglePointIcon extends PIXI.Container {
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
this.text.x = singlePointIcon.x; |
|
|
|
|
this.text.y = singlePointIcon.y - 32; |
|
|
|
|
this.text.anchor.set(0.5); |
|
|
|
|
this.text.y = singlePointIcon.y - singlePointIcon.height / 2; |
|
|
|
|
this.text.anchor.set(0.5, 1); |
|
|
|
|
|
|
|
|
|
this.addChild(this.text); |
|
|
|
|
this.addChild(singlePointIcon); |
|
|
|
|