|
|
|
@ -84,6 +84,8 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
|
|
|
|
|
// console.log(this.backgroundImage.getChildByName(item.assetData.Id));
|
|
|
|
|
// 删除选中的图标
|
|
|
|
|
this.backgroundImage.removeChild(this.backgroundImage.getChildByName(item.assetData.Id)); |
|
|
|
|
// 标记
|
|
|
|
|
this.canvasData.isChange = true; |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
@ -338,6 +340,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
|
|
|
|
|
GameMode : GameMode.BasicInformation |
|
|
|
|
}; |
|
|
|
|
const singleIcon = new SinglePointIcon(assetData, this); |
|
|
|
|
this.canvasData.isChange = true; |
|
|
|
|
break; |
|
|
|
|
case PaintMode.lineIcon: |
|
|
|
|
this.previewLineSegment.visible = true; |
|
|
|
@ -608,6 +611,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
|
|
|
|
|
case PaintMode.lineIcon: |
|
|
|
|
if (this.paintPoints.length >= 2) { |
|
|
|
|
this.paintingIcon = null; |
|
|
|
|
this.canvasData.isChange = true; |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
case PaintMode.polygonIcon: |
|
|
|
@ -644,6 +648,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
|
|
|
|
|
GameMode: GameMode.BasicInformation |
|
|
|
|
}; |
|
|
|
|
const polygonIcon = new PolygonIcon(assetData, this); |
|
|
|
|
this.canvasData.isChange = true; |
|
|
|
|
} |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
@ -712,6 +717,7 @@ export class SinglePointIcon extends PIXI.Container {
|
|
|
|
|
// this.text.y = newPosition.y - 32;
|
|
|
|
|
|
|
|
|
|
this.assetData.Point = new PIXI.Point(this.x, this.y); |
|
|
|
|
this.workingArea.canvasData.isChange = true; |
|
|
|
|
// console.log(this.workingArea.canvasData.originaleveryStoreyData);
|
|
|
|
|
// console.log(this.workingArea.canvasData.originaleveryStoreyData.data[this.assetData.Id].Point);
|
|
|
|
|
} |
|
|
|
@ -814,6 +820,8 @@ export class MultipointIcon extends PIXI.Container {
|
|
|
|
|
|
|
|
|
|
this.assetData.MultiPoint[index].x = newPosition.x; |
|
|
|
|
this.assetData.MultiPoint[index].y = newPosition.y; |
|
|
|
|
this.workingArea.canvasData.isChange = true; |
|
|
|
|
|
|
|
|
|
if (index === 0) {// 第一个点
|
|
|
|
|
this.iconsTilingSprite[index].x = newPosition.x; |
|
|
|
|
this.iconsTilingSprite[index].y = newPosition.y; |
|
|
|
@ -897,6 +905,7 @@ export class MultipointIcon extends PIXI.Container {
|
|
|
|
|
event.currentTarget.parent.y = newPosition.y - event.currentTarget.parent.dragPoint.y; |
|
|
|
|
|
|
|
|
|
this.assetData.Point = new PIXI.Point(this.x, this.y); |
|
|
|
|
this.workingArea.canvasData.isChange = true; |
|
|
|
|
// console.log(this.workingArea.canvasData.originaleveryStoreyData.data[this.assetData.Id].Point);
|
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
@ -996,7 +1005,7 @@ export class PolygonIcon extends PIXI.Container {
|
|
|
|
|
|
|
|
|
|
this.assetData.MultiPoint[index].x = newPosition.x; |
|
|
|
|
this.assetData.MultiPoint[index].y = newPosition.y; |
|
|
|
|
|
|
|
|
|
this.workingArea.canvasData.isChange = true; |
|
|
|
|
// 填充多边形
|
|
|
|
|
this.polygonGraphics.clear(); |
|
|
|
|
this.polygonGraphics.beginFill(0xDC143C, 1); |
|
|
|
@ -1043,6 +1052,7 @@ export class PolygonIcon extends PIXI.Container {
|
|
|
|
|
event.currentTarget.parent.y = newPosition.y - event.currentTarget.parent.dragPoint.y; |
|
|
|
|
|
|
|
|
|
this.assetData.Point = new PIXI.Point(this.x, this.y); |
|
|
|
|
this.workingArea.canvasData.isChange = true; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
.on('rightclick', event => { |
|
|
|
|