|
|
|
@ -643,10 +643,11 @@ enum PaintMode {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export class SinglePointIcon extends PIXI.Container { |
|
|
|
|
// public assetData: any;
|
|
|
|
|
private text = new PIXI.Text(this.assetData.Name, { |
|
|
|
|
fontFamily: 'Arial', fontSize: 24, fill: 0xffffff, align: 'center' |
|
|
|
|
}); |
|
|
|
|
constructor(private assetData: any, private workingArea: WorkingAreaComponent) { |
|
|
|
|
super(); |
|
|
|
|
// this.assetData = assetData;
|
|
|
|
|
this.workingArea.backgroundImage.addChild(this); |
|
|
|
|
const singlePointIcon = PIXI.Sprite.from(this.assetData.ImageUrl); |
|
|
|
|
singlePointIcon.x = this.assetData.Point.x; |
|
|
|
@ -683,17 +684,20 @@ export class SinglePointIcon extends PIXI.Container {
|
|
|
|
|
const newPosition = event.currentTarget.data.getLocalPosition(event.currentTarget.parent); |
|
|
|
|
event.currentTarget.x = newPosition.x; |
|
|
|
|
event.currentTarget.y = newPosition.y; |
|
|
|
|
|
|
|
|
|
this.text.x = newPosition.x; |
|
|
|
|
this.text.y = newPosition.y - 32; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
.on('rightclick', event => { |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
const text = new PIXI.Text(this.assetData.Name, { |
|
|
|
|
fontFamily: 'Arial', fontSize: 24, fill: 0xffffff, align: 'center' |
|
|
|
|
}); |
|
|
|
|
text.anchor.set(0.5); |
|
|
|
|
text.y -= this.assetData.Height + 12; |
|
|
|
|
singlePointIcon.addChild(text); |
|
|
|
|
|
|
|
|
|
this.text.x = singlePointIcon.x; |
|
|
|
|
this.text.y = singlePointIcon.y - 32; |
|
|
|
|
this.text.anchor.set(0.5); |
|
|
|
|
|
|
|
|
|
this.addChild(this.text); |
|
|
|
|
this.addChild(singlePointIcon); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|