From 7ac8ee1943d39313c483104920d3bf00db57a057 Mon Sep 17 00:00:00 2001 From: "DESKTOP-474NEJQ\\xzsjob" <359059686@qq.com> Date: Mon, 24 Aug 2020 15:05:38 +0800 Subject: [PATCH] =?UTF-8?q?[=E5=AE=8C=E5=96=84]=20=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E6=A0=87=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/working-area/working-area.component.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/app/working-area/working-area.component.ts b/src/app/working-area/working-area.component.ts index c01fe72..b972572 100644 --- a/src/app/working-area/working-area.component.ts +++ b/src/app/working-area/working-area.component.ts @@ -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 => {