|
|
|
@ -263,13 +263,16 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
|
|
|
|
|
if (item.assetData.FixedSize) { |
|
|
|
|
const data = 1 / scale; |
|
|
|
|
item.scale.set(data); |
|
|
|
|
} else { |
|
|
|
|
const data = 1 / scale; |
|
|
|
|
item.text.scale.set(data); |
|
|
|
|
} |
|
|
|
|
} else if (item instanceof MultipointIcon) { |
|
|
|
|
const data = 1 / scale; |
|
|
|
|
item.text.scale.set(scale); |
|
|
|
|
item.text.scale.set(data); |
|
|
|
|
} else if (item instanceof PolygonIcon) { |
|
|
|
|
const data = 1 / scale; |
|
|
|
|
item.text.scale.set(scale); |
|
|
|
|
item.text.scale.set(data); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
@ -448,9 +451,9 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
|
|
|
|
|
IsFromBuilding: false, |
|
|
|
|
GameMode: 2 |
|
|
|
|
}; |
|
|
|
|
const tempCar = new SinglePointIcon(tempData, this); |
|
|
|
|
const tempCar = new Car(tempData, this); |
|
|
|
|
tempCar.setParent(this.app.stage); |
|
|
|
|
tempCar.position.set(300, 66); |
|
|
|
|
tempCar.position.set(25, 25); |
|
|
|
|
|
|
|
|
|
const tempData2 = { |
|
|
|
|
TemplateId: null, |
|
|
|
@ -493,14 +496,15 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
|
|
|
|
|
IsFromBuilding: false, |
|
|
|
|
GameMode: 2 |
|
|
|
|
}; |
|
|
|
|
const tempCar2 = new SinglePointIcon(tempData2, this); |
|
|
|
|
const tempCar2 = new Car(tempData2, this); |
|
|
|
|
tempCar2.setParent(this.app.stage); |
|
|
|
|
tempCar2.position.set(300, 148); |
|
|
|
|
tempCar2.position.set(25, 50); |
|
|
|
|
|
|
|
|
|
this.cancelPaint(); |
|
|
|
|
this.paintMode = PaintMode.connection; |
|
|
|
|
this.previewSinglePointIcon.texture = PIXI.Texture.from('./assets/images/水罐消防车.png'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* |
|
|
|
|
* @param id 图标ID |
|
|
|
@ -785,7 +789,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
|
|
|
|
|
*/ |
|
|
|
|
public destroyBackgroundImage(): void { |
|
|
|
|
this.app.stage.removeChild(this.backgroundImage); |
|
|
|
|
this.removeAllListeners('backgroundScale'); |
|
|
|
|
// this.removeAllListeners('backgroundScale');
|
|
|
|
|
} |
|
|
|
|
/** |
|
|
|
|
* 设置背景图缩放 |
|
|
|
@ -1062,7 +1066,7 @@ export class SinglePointIcon extends PIXI.Container {
|
|
|
|
|
wordWrapWidth: 100, |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
private text = new PIXI.Text(this.assetData.Name |
|
|
|
|
public text = new PIXI.Text(this.assetData.Name |
|
|
|
|
+ '\r\n' |
|
|
|
|
+ this.assetData.PropertyInfos?.find(item => item.PropertyName === '名称/编号')?.PropertyValue, this.style); |
|
|
|
|
private image = PIXI.Sprite.from(this.assetData.ImageUrl); |
|
|
|
@ -1646,7 +1650,9 @@ export class PolygonIcon extends PIXI.Container {
|
|
|
|
|
this.polygonGraphics.endFill(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
export class Car extends SinglePointIcon { |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
export class Conection extends PIXI.Container { |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|