|
|
|
@ -506,6 +506,10 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
|
|
|
|
|
this.setPaintMode(PaintMode.endPaint); |
|
|
|
|
this.resetCanvas(); |
|
|
|
|
this.destroyBackgroundImage(); |
|
|
|
|
if (this.canvasData.selectStorey.imageUrl === null) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
console.log(this.canvasData.selectStorey.imageUrl); |
|
|
|
|
await this.createBackgroundImage(this.canvasData.selectStorey.imageUrl); |
|
|
|
|
this.createFloorShape(); |
|
|
|
|
if (this.canvasData.gameMode === GameMode.Assignment) { |
|
|
|
@ -531,7 +535,11 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
|
|
|
|
|
const polygonIcon = new PolygonIcon(floorData[key], this); |
|
|
|
|
break; |
|
|
|
|
case 3: |
|
|
|
|
const pipeline = new Pipeline(floorData[key], this); |
|
|
|
|
if (floorData[key].Name === '水带') { |
|
|
|
|
const pipeline = new Pipeline(floorData[key], this); |
|
|
|
|
} else { |
|
|
|
|
const wall = new AxArrowConnector(floorData[key], this); |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
@ -640,7 +648,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
|
|
|
|
|
this.backgroundImage.y = this.app.view.height / 2; |
|
|
|
|
this.backgroundImage.interactive = true; |
|
|
|
|
this.backgroundImage.name = 'background'; |
|
|
|
|
|
|
|
|
|
this.backgroundImage.angle = this.canvasData.selectStorey.imageAngle; |
|
|
|
|
// const left = this.init.element.nativeElement.querySelector('.functionalDomainLeft').clientWidth;
|
|
|
|
|
// const right = this.init.element.nativeElement.querySelector('.functionalDomainRight').clientWidth;
|
|
|
|
|
const imageWidth = this.backgroundImage.texture.width; |
|
|
|
@ -920,9 +928,10 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
|
|
|
|
|
if (!this.canvasData.selectStorey.imageUrl) { |
|
|
|
|
this.backgroundImage.visible = false; |
|
|
|
|
} else { |
|
|
|
|
this.backgroundImage.texture = PIXI.Texture.from(this.canvasData.selectStorey.imageUrl); |
|
|
|
|
this.backgroundImage.angle = this.canvasData.selectStorey.imageAngle; |
|
|
|
|
this.backgroundImage.visible = true; |
|
|
|
|
// this.backgroundImage.texture = PIXI.Texture.from(this.canvasData.selectStorey.imageUrl);
|
|
|
|
|
// this.backgroundImage.angle = this.canvasData.selectStorey.imageAngle;
|
|
|
|
|
// this.backgroundImage.visible = true;
|
|
|
|
|
this.refresh(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
/** |
|
|
|
@ -1152,7 +1161,10 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
|
|
|
|
|
this.emit('createIcon', polygonIcon); |
|
|
|
|
} |
|
|
|
|
case PaintMode.Pipeline: |
|
|
|
|
this.paintingShape = null; |
|
|
|
|
if (this.canvasData.selectTemplateData.name !== '水带') { |
|
|
|
|
this.emit('createIcon', this.paintingShape); |
|
|
|
|
this.paintingShape = null; |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
this.paintPoints.splice(0, this.paintPoints.length); |
|
|
|
|