From 60b221e568adb887f801a7b028f753b66320a67f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=8C=AF=E5=8D=87?= <359059686@qq.com> Date: Sat, 9 Jan 2021 10:23:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E7=89=88=E6=9C=AC1.0.3.20210?= =?UTF-8?q?109b?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/working-area/model/axArrowConnector.ts | 8 +++++++- src/app/working-area/model/axImageShape.ts | 2 +- src/app/working-area/model/axPreviewImageShape.ts | 3 +++ src/app/working-area/model/multipointIcon.ts | 2 +- src/app/working-area/model/polygonIcon.ts | 2 +- src/app/working-area/working-area.component.ts | 8 +++++++- 6 files changed, 20 insertions(+), 5 deletions(-) diff --git a/src/app/working-area/model/axArrowConnector.ts b/src/app/working-area/model/axArrowConnector.ts index cacc7d5..6ed0dd9 100644 --- a/src/app/working-area/model/axArrowConnector.ts +++ b/src/app/working-area/model/axArrowConnector.ts @@ -2,6 +2,7 @@ import { WorkingAreaComponent } from '../working-area.component'; import * as PIXI from 'pixi.js'; import { AxShape } from './axShape'; import { Sprite } from 'pixi.js'; +import { GameMode } from './gameMode'; /** * 连接箭头 @@ -116,11 +117,16 @@ export class AxArrowConnector extends AxShape { } // 设置缩放 public setItemScale(scale: number) { - this.text.scale.set(scale); + // this.text.scale.set(scale); this.pointSprites.forEach(point => { point.scale.set(scale); }); } + public setNameVisible(value: boolean, mode: GameMode) { + if (this.assetData.GameMode === mode) { + this.text.visible = value; + } + } /** * 刷新形状 */ diff --git a/src/app/working-area/model/axImageShape.ts b/src/app/working-area/model/axImageShape.ts index 48b23ff..d12ae3c 100644 --- a/src/app/working-area/model/axImageShape.ts +++ b/src/app/working-area/model/axImageShape.ts @@ -186,7 +186,7 @@ export class AxImageShape extends AxShape { if (this.assetData.FixedSize) { this.scale.set(scale); } else { - this.text.scale.set(scale); + // this.text.scale.set(scale); this.upLeft.scale.set(scale); this.upRight.scale.set(scale); this.downLeft.scale.set(scale); diff --git a/src/app/working-area/model/axPreviewImageShape.ts b/src/app/working-area/model/axPreviewImageShape.ts index 8d0cd5d..7f66812 100644 --- a/src/app/working-area/model/axPreviewImageShape.ts +++ b/src/app/working-area/model/axPreviewImageShape.ts @@ -33,4 +33,7 @@ export class AxPreviewImageShape extends AxShape { */ public drawBorder(scale: number) { } + public refresh() { + this.angle = -this.workingArea.backgroundImage.angle; + } } diff --git a/src/app/working-area/model/multipointIcon.ts b/src/app/working-area/model/multipointIcon.ts index a8bd056..395afd1 100644 --- a/src/app/working-area/model/multipointIcon.ts +++ b/src/app/working-area/model/multipointIcon.ts @@ -185,7 +185,7 @@ export class MultipointIcon extends AxShape { } // 设置缩放 public setItemScale(scale: number) { - this.text.scale.set(scale); + // this.text.scale.set(scale); this.pointsGraphics.forEach((item, index, array) => { item.scale.set(scale); }); diff --git a/src/app/working-area/model/polygonIcon.ts b/src/app/working-area/model/polygonIcon.ts index 7aa9a40..2494748 100644 --- a/src/app/working-area/model/polygonIcon.ts +++ b/src/app/working-area/model/polygonIcon.ts @@ -157,7 +157,7 @@ export class PolygonIcon extends AxShape { } // 设置缩放 public setItemScale(scale: number) { - this.text.scale.set(scale); + // this.text.scale.set(scale); this.pointsGraphics.forEach(point => { point.scale.set(scale); }); diff --git a/src/app/working-area/working-area.component.ts b/src/app/working-area/working-area.component.ts index d7344f1..f010069 100644 --- a/src/app/working-area/working-area.component.ts +++ b/src/app/working-area/working-area.component.ts @@ -141,7 +141,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV // Beta版: 该版本相对于α版已有了很大的改进,消除了严重的错误,但还是存在着一些缺陷,需要经过多次测试来进一步消除,此版本主要的修改对像是软件的UI。 // RC版: 该版本已经相当成熟了,基本上不存在导致错误的BUG,与即将发行的正式版相差无几。 // Release版: 该版本意味“最终版本”,在前面版本的一系列测试版之后,终归会有一个正式版本,是最终交付用户使用的一个版本。该版本有时也称为标准版。一般情况下,Release不会以单词形式出现在软件封面上,取而代之的是符号®。 - public VERSION = '1.0.2.20210108_beta'; + public VERSION = '1.0.3.20210109_beta'; /** * 数据初始化 */ @@ -442,6 +442,8 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV item.setNameVisible(value, mode); } else if (item instanceof PolygonIcon) { item.setNameVisible(value, mode); + } else if (item instanceof AxArrowConnector) { + item.setNameVisible(value, mode); } }); } @@ -594,6 +596,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV this.backgroundImage.sortableChildren = true; this.backgroundImage .on('pointerdown', event => { + if (event.data.button !== 0) return; if (!event.currentTarget.dragging && this.selection.isMultiselection === false) { this.selection.deselectAll(); event.currentTarget.data = event.data; @@ -651,6 +654,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV if (this.paintPoints.length >= 2) { this.enterPaintEndButton.position = this.circleShadow.position; this.enterPaintEndButton.visible = true; + this.enterPaintEndButton.zIndex = this.backgroundImage.children.length; } if (this.paintingIcon !== null) { @@ -708,6 +712,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV this.enterPaintEndButton.position = this.circleShadow.position; } else if (this.paintPoints.length >= 3) { this.enterPaintEndButton.visible = true; + this.enterPaintEndButton.zIndex = this.backgroundImage.children.length; } this.paintPoints.forEach((value, index, array) => { if (index === 0) { @@ -736,6 +741,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV this.previewLineSegment.visible = true; this.enterPaintEndButton.position = this.circleShadow.position; this.enterPaintEndButton.visible = true; + this.enterPaintEndButton.zIndex = this.backgroundImage.children.length; this.currentClickPoint.position = new PIXI.Point(this.circleShadow.x, this.circleShadow.y); this.paintPoints.push(new PIXI.Point(this.circleShadow.x, this.circleShadow.y)); if (this.paintPoints.length < 2) {