diff --git a/src/app/ui/plan-assistance/plan-assistance.component.html b/src/app/ui/plan-assistance/plan-assistance.component.html index 4f08453..3b92400 100644 --- a/src/app/ui/plan-assistance/plan-assistance.component.html +++ b/src/app/ui/plan-assistance/plan-assistance.component.html @@ -1 +1 @@ -

plan-assistance works!

+ \ No newline at end of file diff --git a/src/app/working-area/working-area.component.ts b/src/app/working-area/working-area.component.ts index 75659d8..65e3761 100644 --- a/src/app/working-area/working-area.component.ts +++ b/src/app/working-area/working-area.component.ts @@ -4,7 +4,7 @@ import { EventEmitter } from 'events'; import { EventManager } from '@angular/platform-browser'; import { OutlineFilter } from 'pixi-filters'; import { CanvasShareDataService, GameMode } from '../canvas-share-data.service'; -import {CacheTokenService} from '../http-interceptors/cache-token.service' //引入自动登录 获取token服务 +import {CacheTokenService} from '../http-interceptors/cache-token.service'; // 引入自动登录 获取token服务 import * as ObjectID from 'bson-objectid'; import { Router } from '@angular/router'; @@ -17,7 +17,7 @@ import { Router } from '@angular/router'; export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterViewInit { - constructor(private eventManager: EventManager, public canvasData: CanvasShareDataService, public token: CacheTokenService,private router: Router,) { + constructor(private eventManager: EventManager, public canvasData: CanvasShareDataService, public token: CacheTokenService, private router: Router, ) { super(); } @@ -90,7 +90,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV /** * 确认绘制按钮 */ - private enterPaintEndButton = PIXI.Sprite.from('assets/images/enterPaintButton.jpg'); + private enterPaintEndButton = PIXI.Sprite.from('assets/images/enterPaintButton.png'); /** * 框选工具图形 */ @@ -110,26 +110,26 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV // 根据ID 找到数据 - //是否登录 - public verificationURL = '/ui/collectionTools' //验证url地址是否为验证页面 - isLogin () { - let token = sessionStorage.getItem('token') // 判断 是否登录状态 + // 是否登录 + public verificationURL = '/ui/collectionTools'; // 验证url地址是否为验证页面 + isLogin() { + const token = sessionStorage.getItem('token'); // 判断 是否登录状态 if (token) { - this.init.getAllLibrary() - this.init.getAllBuildings() - this.init.getAllFirePlan() - this.init.getSitePlan() //调用父组件 初始化方法 + this.init.getAllLibrary(); + this.init.getAllBuildings(); + this.init.getAllFirePlan(); + this.init.getSitePlan(); // 调用父组件 初始化方法 } else { - this.token.login().then(res=>{ - this.init.params.companyId = sessionStorage.getItem('companyId') - this.init.getAllLibrary() - this.init.getAllBuildings() - this.init.getAllFirePlan() - this.init.getSitePlan() //调用父组件 初始化方法 - }) + this.token.login().then(res => { + this.init.params.companyId = sessionStorage.getItem('companyId'); + this.init.getAllLibrary(); + this.init.getAllBuildings(); + this.init.getAllFirePlan(); + this.init.getSitePlan(); // 调用父组件 初始化方法 + }); } } - //是否登录 + // 是否登录 ngOnInit(): void { this.eventManager.addGlobalEventListener('window', 'keydown', (event: any) => { @@ -230,8 +230,9 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV backgroundColor: 0xE9FAFF }); this.content.nativeElement.appendChild(this.app.view); - let url = this.router.url - url == this.verificationURL? this.isLogin() : null + const url = this.router.url; + // tslint:disable-next-line: no-unused-expression + url === this.verificationURL ? this.isLogin() : null; this.createBackgroundImage(); // this.createPreviewSinglePointIcon(); @@ -384,34 +385,1224 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV public loadDemoScene() { this.backgroundImage.texture = PIXI.Texture.from('./assets/images/demo.jpg'); setTimeout(() => { - const assetData = { - TemplateId: null, - FloorId: null, - Angle: 0, - Color: 0, - Enabled: true, - FillMode: 0, - FireElementId: 0, - FixedSize: true, - Height: 32, - Width: 32, - Id: ObjectID.default.generate(), - ImageUrl: './assets/images/泡沫消防车.png', - InteractiveMode: 0, - MultiPoint: null, - Point: new PIXI.Point(5295 - (this.backgroundImage.texture.width / 2), 4067 - (this.backgroundImage.texture.height / 2)), - Name: '', - PropertyInfos: null, - Border: null, - DrawMode: null, - Thickness: 0, - IsFromBuilding: false, - GameMode: 0 - }; - const single = new SinglePointIcon(assetData, this); - }, 100); + const list = [ + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/地上消火栓.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(5295 - (this.backgroundImage.texture.width / 2), 4067 - (this.backgroundImage.texture.height / 2)), + Name: '地上消火栓0', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/地上消火栓.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(6117 - (this.backgroundImage.texture.width / 2), 3811 - (this.backgroundImage.texture.height / 2)), + Name: '地上消火栓1', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/地上消火栓.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(6117 - (this.backgroundImage.texture.width / 2), 3437 - (this.backgroundImage.texture.height / 2)), + Name: '地上消火栓2', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/地上消火栓.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(6117 - (this.backgroundImage.texture.width / 2), 2896 - (this.backgroundImage.texture.height / 2)), + Name: '地上消火栓3', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/地上消火栓.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(6117 - (this.backgroundImage.texture.width / 2), 2600 - (this.backgroundImage.texture.height / 2)), + Name: '地上消火栓4', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/地上消火栓.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(5450 - (this.backgroundImage.texture.width / 2), 2420 - (this.backgroundImage.texture.height / 2)), + Name: '地上消火栓5', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/地上消火栓.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(5149 - (this.backgroundImage.texture.width / 2), 2849 - (this.backgroundImage.texture.height / 2)), + Name: '地上消火栓6', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/地上消火栓.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(5149 - (this.backgroundImage.texture.width / 2), 3609 - (this.backgroundImage.texture.height / 2)), + Name: '地上消火栓7', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/地上消火栓.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(4991 - (this.backgroundImage.texture.width / 2), 4175 - (this.backgroundImage.texture.height / 2)), + Name: '地上消火栓8', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/地上消火栓.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(4580 - (this.backgroundImage.texture.width / 2), 4175 - (this.backgroundImage.texture.height / 2)), + Name: '地上消火栓9', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/地上消火栓.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(3986 - (this.backgroundImage.texture.width / 2), 4337 - (this.backgroundImage.texture.height / 2)), + Name: '地上消火栓10', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/地上消火栓.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(3557 - (this.backgroundImage.texture.width / 2), 4337 - (this.backgroundImage.texture.height / 2)), + Name: '地上消火栓11', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/地上消火栓.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(3481 - (this.backgroundImage.texture.width / 2), 3844 - (this.backgroundImage.texture.height / 2)), + Name: '地上消火栓12', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/地上消火栓.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(3804 - (this.backgroundImage.texture.width / 2), 3844 - (this.backgroundImage.texture.height / 2)), + Name: '地上消火栓13', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/地上消火栓.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(4136 - (this.backgroundImage.texture.width / 2), 3844 - (this.backgroundImage.texture.height / 2)), + Name: '地上消火栓14', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/地上消火栓.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(4544 - (this.backgroundImage.texture.width / 2), 3234 - (this.backgroundImage.texture.height / 2)), + Name: '地上消火栓15', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/地上消火栓.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(4086 - (this.backgroundImage.texture.width / 2), 3234 - (this.backgroundImage.texture.height / 2)), + Name: '地上消火栓16', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/地上消火栓.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(3445 - (this.backgroundImage.texture.width / 2), 3234 - (this.backgroundImage.texture.height / 2)), + Name: '地上消火栓17', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/地上消火栓.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(2458 - (this.backgroundImage.texture.width / 2), 3532 - (this.backgroundImage.texture.height / 2)), + Name: '地上消火栓18', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/地上消火栓.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(2458 - (this.backgroundImage.texture.width / 2), 4492 - (this.backgroundImage.texture.height / 2)), + Name: '地上消火栓19', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/地上消火栓.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(4130 - (this.backgroundImage.texture.width / 2), 2683 - (this.backgroundImage.texture.height / 2)), + Name: '地上消火栓20', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/地上消火栓.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(4904 - (this.backgroundImage.texture.width / 2), 2455 - (this.backgroundImage.texture.height / 2)), + Name: '地上消火栓21', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/地上消火栓.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(5137 - (this.backgroundImage.texture.width / 2), 2156 - (this.backgroundImage.texture.height / 2)), + Name: '地上消火栓22', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/地上消火栓.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(6922 - (this.backgroundImage.texture.width / 2), 2481 - (this.backgroundImage.texture.height / 2)), + Name: '地上消火栓23', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/地上消火栓.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(6922 - (this.backgroundImage.texture.width / 2), 3017 - (this.backgroundImage.texture.height / 2)), + Name: '地上消火栓24', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/地上消火栓.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(5931 - (this.backgroundImage.texture.width / 2), 3119 - (this.backgroundImage.texture.height / 2)), + Name: '地上消火栓25', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/地上消火栓.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(4087 - (this.backgroundImage.texture.width / 2), 2398 - (this.backgroundImage.texture.height / 2)), + Name: '地上消火栓26', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/泡沫栓.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(5361 - (this.backgroundImage.texture.width / 2), 4042 - (this.backgroundImage.texture.height / 2)), + Name: '泡沫栓0', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/泡沫栓.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(5943 - (this.backgroundImage.texture.width / 2), 4042 - (this.backgroundImage.texture.height / 2)), + Name: '泡沫栓1', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/泡沫栓.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(6047 - (this.backgroundImage.texture.width / 2), 2410 - (this.backgroundImage.texture.height / 2)), + Name: '泡沫栓2', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/泡沫栓.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(5517 - (this.backgroundImage.texture.width / 2), 2440 - (this.backgroundImage.texture.height / 2)), + Name: '泡沫栓3', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/泡沫栓.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(5187 - (this.backgroundImage.texture.width / 2), 2819 - (this.backgroundImage.texture.height / 2)), + Name: '泡沫栓4', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/泡沫栓.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(5187 - (this.backgroundImage.texture.width / 2), 3645 - (this.backgroundImage.texture.height / 2)), + Name: '泡沫栓5', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/泡沫栓.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(4504 - (this.backgroundImage.texture.width / 2), 3267 - (this.backgroundImage.texture.height / 2)), + Name: '泡沫栓6', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/泡沫栓.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(2468 - (this.backgroundImage.texture.width / 2), 3576 - (this.backgroundImage.texture.height / 2)), + Name: '泡沫栓7', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/泡沫栓.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(2468 - (this.backgroundImage.texture.width / 2), 4533 - (this.backgroundImage.texture.height / 2)), + Name: '泡沫栓8', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/泡沫栓.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(5081 - (this.backgroundImage.texture.width / 2), 2140 - (this.backgroundImage.texture.height / 2)), + Name: '泡沫栓9', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/泡沫栓.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(6875 - (this.backgroundImage.texture.width / 2), 2441 - (this.backgroundImage.texture.height / 2)), + Name: '泡沫栓10', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/泡沫栓.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(6875 - (this.backgroundImage.texture.width / 2), 3063 - (this.backgroundImage.texture.height / 2)), + Name: '泡沫栓11', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/泡沫栓.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(5981 - (this.backgroundImage.texture.width / 2), 3095 - (this.backgroundImage.texture.height / 2)), + Name: '泡沫栓12', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/泡沫栓.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(5570 - (this.backgroundImage.texture.width / 2), 3095 - (this.backgroundImage.texture.height / 2)), + Name: '泡沫栓13', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/泡沫栓.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(4093 - (this.backgroundImage.texture.width / 2), 2468 - (this.backgroundImage.texture.height / 2)), + Name: '泡沫栓14', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/固定水泡.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(5892 - (this.backgroundImage.texture.width / 2), 4067 - (this.backgroundImage.texture.height / 2)), + Name: '固定水泡0', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/固定水泡.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(5993 - (this.backgroundImage.texture.width / 2), 2378 - (this.backgroundImage.texture.height / 2)), + Name: '固定水泡1', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/固定水泡.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(3464 - (this.backgroundImage.texture.width / 2), 3844 - (this.backgroundImage.texture.height / 2)), + Name: '固定水泡2', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/固定水泡.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(3646 - (this.backgroundImage.texture.width / 2), 3844 - (this.backgroundImage.texture.height / 2)), + Name: '固定水泡3', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/固定水泡.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(3978 - (this.backgroundImage.texture.width / 2), 3844 - (this.backgroundImage.texture.height / 2)), + Name: '固定水泡4', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/固定水泡.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(4041 - (this.backgroundImage.texture.width / 2), 3267 - (this.backgroundImage.texture.height / 2)), + Name: '固定水泡5', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/固定水泡.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(3408 - (this.backgroundImage.texture.width / 2), 3267 - (this.backgroundImage.texture.height / 2)), + Name: '固定水泡6', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + }, + { + TemplateId: null, + FloorId: null, + Angle: 0, + Color: 0, + Enabled: true, + FillMode: 0, + FireElementId: 0, + FixedSize: true, + Height: 32, + Width: 32, + Id: ObjectID.default.generate(), + ImageUrl: './assets/images/固定水泡.png', + InteractiveMode: 0, + MultiPoint: null, + Point: new PIXI.Point(5363 - (this.backgroundImage.texture.width / 2), 3119 - (this.backgroundImage.texture.height / 2)), + Name: '固定水泡7', + PropertyInfos: null, + Border: null, + DrawMode: null, + Thickness: 0, + IsFromBuilding: false, + GameMode: GameMode.BasicInformation + } + ]; + + console.log(JSON.stringify(list)); + + - // this.backgroundImage.anchor.set(0); + list.forEach(element => { + const single = new SinglePointIcon(element, this); + }); + + // const single = new SinglePointIcon(assetData0, this); + + + this.setNameVisible(false, GameMode.BasicInformation); + + this.allowEdit = false; + }, 100); } /** * @@ -993,6 +2184,7 @@ export class SinglePointIcon extends PIXI.Container { this.image.interactive = true; this.image .on('mousedown', event => { + console.log(this.assetData.Name); event.stopPropagation(); this.workingArea.selection.selectOne(this); if (this.workingArea.allowEdit) { diff --git a/src/assets/images/enterPaintButton.jpg b/src/assets/images/enterPaintButton.jpg deleted file mode 100644 index 44b5faf..0000000 Binary files a/src/assets/images/enterPaintButton.jpg and /dev/null differ diff --git a/src/assets/images/enterPaintButton.png b/src/assets/images/enterPaintButton.png new file mode 100644 index 0000000..e6b99b7 Binary files /dev/null and b/src/assets/images/enterPaintButton.png differ diff --git a/src/assets/images/固定水泡.png b/src/assets/images/固定水泡.png new file mode 100644 index 0000000..d087c48 Binary files /dev/null and b/src/assets/images/固定水泡.png differ diff --git a/src/assets/images/地上消火栓.png b/src/assets/images/地上消火栓.png new file mode 100644 index 0000000..5828315 Binary files /dev/null and b/src/assets/images/地上消火栓.png differ diff --git a/src/assets/images/泡沫栓.png b/src/assets/images/泡沫栓.png new file mode 100644 index 0000000..73fb9d7 Binary files /dev/null and b/src/assets/images/泡沫栓.png differ