|
|
|
@ -708,28 +708,30 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
|
|
|
|
|
*/ |
|
|
|
|
public paste(companyId: string, buildingId: string, floorId: string): void { |
|
|
|
|
this.copyData.forEach(item => { |
|
|
|
|
item.Id = Guid.NewGuid().ToString(); |
|
|
|
|
item.CompanyId = companyId; |
|
|
|
|
item.BuildingId = buildingId; |
|
|
|
|
item.FloorId = floorId; |
|
|
|
|
item.Point = new PIXI.Point(item.Point.x + 5, item.Point.y + 5); |
|
|
|
|
if (item.IsFromBuilding) { |
|
|
|
|
this.canvasData.originalcompanyBuildingData.data[item.Id] = item; |
|
|
|
|
const newData = JSON.parse(JSON.stringify(item)); |
|
|
|
|
newData.Id = Guid.NewGuid().ToString(); |
|
|
|
|
newData.CompanyId = companyId; |
|
|
|
|
newData.BuildingId = buildingId; |
|
|
|
|
newData.FloorId = floorId; |
|
|
|
|
newData.Point = new PIXI.Point(item.Point.x + 5, item.Point.y + 5); |
|
|
|
|
if (newData.IsFromBuilding) { |
|
|
|
|
this.canvasData.originalcompanyBuildingData.data[newData.Id] = newData; |
|
|
|
|
} else { |
|
|
|
|
this.canvasData.originaleveryStoreyData.data[item.Id] = item; |
|
|
|
|
this.canvasData.originaleveryStoreyData.data[newData.Id] = newData; |
|
|
|
|
} |
|
|
|
|
switch (item.InteractiveMode) { |
|
|
|
|
case PaintMode.singlePointIcon: |
|
|
|
|
const singleIcon = new SinglePointIcon(item, this); |
|
|
|
|
const singleIcon = new SinglePointIcon(newData, this); |
|
|
|
|
break; |
|
|
|
|
case PaintMode.lineIcon: |
|
|
|
|
const lineIcon = new MultipointIcon(item, this); |
|
|
|
|
const lineIcon = new MultipointIcon(newData, this); |
|
|
|
|
break; |
|
|
|
|
case PaintMode.polygonIcon: |
|
|
|
|
const polygonIcon = new PolygonIcon(item, this); |
|
|
|
|
const polygonIcon = new PolygonIcon(newData, this); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
this.selection.select(this.backgroundImage.getChildByName(item.Id)); |
|
|
|
|
this.selection.select(this.backgroundImage.getChildByName(newData.Id)); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|