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);