|
|
|
@ -60,7 +60,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
|
|
|
|
|
/** |
|
|
|
|
* 绘画模式 |
|
|
|
|
*/ |
|
|
|
|
private paintMode: PaintMode; |
|
|
|
|
private paintMode: PaintMode = PaintMode.endPaint; |
|
|
|
|
/** |
|
|
|
|
* 选择器 |
|
|
|
|
*/ |
|
|
|
@ -169,21 +169,32 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
|
|
|
|
|
this.selection.objects.forEach(item => { |
|
|
|
|
// 删除 选中的数据
|
|
|
|
|
if (item.assetData?.IsFromBuilding) { |
|
|
|
|
// console.log(this.canvasData.originaleveryStoreyData.data[item.assetData.Id]);
|
|
|
|
|
delete this.canvasData.originalcompanyBuildingData?.data[item.assetData.Id]; |
|
|
|
|
// console.log(this.canvasData.originalcompanyBuildingData.data[item.assetData.Id]);
|
|
|
|
|
} else { |
|
|
|
|
// console.log(this.canvasData.originaleveryStoreyData.data[item.assetData.Id]);
|
|
|
|
|
delete this.canvasData.originaleveryStoreyData?.data[item.assetData.Id]; |
|
|
|
|
// console.log(this.canvasData.originaleveryStoreyData.data[item.assetData.Id]);
|
|
|
|
|
} |
|
|
|
|
// console.log(this.backgroundImage.getChildByName(item.assetData.Id));
|
|
|
|
|
// 删除选中的图标
|
|
|
|
|
this.backgroundImage.removeChild(this.backgroundImage.getChildByName(item.assetData.Id)); |
|
|
|
|
// 标记
|
|
|
|
|
this.canvasData.isChange = true; |
|
|
|
|
if (item.assetData.Type !== 1 |
|
|
|
|
&& item.assetData.Type !== 2 |
|
|
|
|
&& item.assetData.Type !== 3 |
|
|
|
|
&& item.assetData.Type !== 4) { |
|
|
|
|
// 删除选中的图标
|
|
|
|
|
let obj = this.backgroundImage.getChildByName(item.assetData.Id); |
|
|
|
|
// this.backgroundImage.removeChild(obj);
|
|
|
|
|
// 找到ll
|
|
|
|
|
obj.destroy(); |
|
|
|
|
// 标记
|
|
|
|
|
this.canvasData.isChange = true; |
|
|
|
|
this.emit('deleteIcon'); |
|
|
|
|
if (obj instanceof Pipeline) { |
|
|
|
|
obj.assetData.LinkedObjects.forEach(element => { |
|
|
|
|
let index = element.assetData.Pipelines.indexOf(obj); |
|
|
|
|
if (index !== -1) { |
|
|
|
|
element.assetData.Pipelines.splice(index, 1); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
this.emit('deleteIcon'); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
// 测试代码
|
|
|
|
@ -258,7 +269,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
|
|
|
|
|
clearTimeout(this.animationTime); |
|
|
|
|
this.animation?.pause(); |
|
|
|
|
this.animationIcon?.scale.set(1); |
|
|
|
|
this.animation = this.c.breathe(icon, 5, 5, 30, true, 0); |
|
|
|
|
this.animation = this.c.breathe(icon, 2, 2, 30, true, 0); |
|
|
|
|
this.animationIcon = icon; |
|
|
|
|
this.animationTime = setTimeout(() => { |
|
|
|
|
this.animation?.pause(); |
|
|
|
@ -530,7 +541,10 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
|
|
|
|
|
list.forEach(element => { |
|
|
|
|
const single = new SinglePointIcon(element, this); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* x: 1787.576244496473 |
|
|
|
|
* y: 628.0452657124683 |
|
|
|
|
*/ |
|
|
|
|
const putCarAreaData = [ |
|
|
|
|
{ |
|
|
|
|
Id: '5f6719a4e03abe3856d87d7b', |
|
|
|
@ -1682,6 +1696,8 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
|
|
|
|
|
event.currentTarget.dragPoint = event.data.getLocalPosition(event.currentTarget.parent); |
|
|
|
|
event.currentTarget.dragPoint.x -= event.currentTarget.x; |
|
|
|
|
event.currentTarget.dragPoint.y -= event.currentTarget.y; |
|
|
|
|
console.log(this.backgroundImage.toLocal(this.mousePosition)); |
|
|
|
|
console.log(this.paintMode); |
|
|
|
|
switch (this.paintMode) { |
|
|
|
|
case PaintMode.endPaint: |
|
|
|
|
console.log(this.backgroundImage.toLocal(this.mousePosition)); |
|
|
|
|