From c7797274118161b4016b51c86bed89fde796cb60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=8C=AF=E5=8D=87?= <359059686@qq.com> Date: Mon, 16 Aug 2021 15:45:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=20=E7=BB=98=E5=88=B6?= =?UTF-8?q?=E6=B0=B4=E5=B8=A6=E5=8F=AF=E4=BB=A5=E7=82=B9=E5=87=BB=E5=9C=A8?= =?UTF-8?q?=E5=B7=B2=E5=88=9B=E5=BB=BA=E5=9B=BE=E6=A0=87=E4=B8=8A=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E7=BB=98=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/working-area/model/axShape.ts | 19 +++++++++++-------- .../working-area/working-area.component.ts | 8 ++++---- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/app/working-area/model/axShape.ts b/src/app/working-area/model/axShape.ts index 7675dae..aee9466 100644 --- a/src/app/working-area/model/axShape.ts +++ b/src/app/working-area/model/axShape.ts @@ -2,6 +2,7 @@ import { Constructor } from '@angular/material/core/common-behaviors/constructor import * as PIXI from 'pixi.js'; import { Point, Rectangle, Graphics, Container } from 'pixi.js'; import { WorkingAreaComponent } from '../working-area.component'; +import { PaintMode } from './paintModel'; /** * 安信形状 @@ -35,14 +36,16 @@ export class AxShape extends Graphics { // this.buttonMode = true; this .on('pointerdown', event => { - event.stopPropagation(); - if (this.allowSelect - && event.data.button === 0) { - this.workingArea.select(this); - } - if (this.allowEdit) { - this.mouseDragging = true; - this.mousePosition = event.data.getLocalPosition(this.workingArea.backgroundImage); + if (workingArea.getPaintMode() !== PaintMode.Pipeline) { + event.stopPropagation(); + if (this.allowSelect + && event.data.button === 0) { + this.workingArea.select(this); + } + if (this.allowEdit) { + this.mouseDragging = true; + this.mousePosition = event.data.getLocalPosition(this.workingArea.backgroundImage); + } } }) .on('pointerup', event => { diff --git a/src/app/working-area/working-area.component.ts b/src/app/working-area/working-area.component.ts index c7a005a..e6bd50e 100644 --- a/src/app/working-area/working-area.component.ts +++ b/src/app/working-area/working-area.component.ts @@ -779,7 +779,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV this.enterPaint(); }); this.backgroundImage.addChild(this.enterPaintEndButton); - this.enterPaintEndButton.zIndex = this.backgroundImage.children.length; + this.enterPaintEndButton.zIndex = this.backgroundImage.children.length + 200; this.enterPaintEndButton.visible = false; } /** @@ -865,7 +865,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; + this.enterPaintEndButton.zIndex = this.backgroundImage.children.length + 200; } if (this.paintingIcon !== null) { @@ -932,7 +932,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.enterPaintEndButton.zIndex = this.backgroundImage.children.length + 200; } this.paintPoints.forEach((value, index, array) => { if (index === 0) { @@ -961,7 +961,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.enterPaintEndButton.zIndex = this.backgroundImage.children.length + 200; // this.currentClickPoint.position = new PIXI.Point(this.circleShadow.x, this.circleShadow.y); // this.paintPoints.push(new PIXI.Point(this.circleShadow.x, this.circleShadow.y)); var point = new PIXI.Point(this.circleShadow.x, this.circleShadow.y);