Browse Source

1.0.18

zhuzhou
徐振升 4 years ago
parent
commit
97f9382f56
  1. 23
      src/app/working-area/working-area.component.ts

23
src/app/working-area/working-area.component.ts

@ -32,7 +32,7 @@ import { EVENT_SELECTION_CHANGED } from './model/events';
/** /**
* *
*/ */
export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterViewInit,OnDestroy { export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterViewInit, OnDestroy {
constructor(private eventManager: EventManager, public canvasData: CanvasShareDataService) { constructor(private eventManager: EventManager, public canvasData: CanvasShareDataService) {
super(); super();
@ -158,7 +158,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
* RC版: 该版本已经相当成熟了BUG * RC版: 该版本已经相当成熟了BUG
* Release版: 该版本意味使Release不会以单词形式出现在软件封面上® * Release版: 该版本意味使Release不会以单词形式出现在软件封面上®
*/ */
public VERSION = '1.0.17.20210204_beta'; public VERSION = '1.0.18.20210205_beta';
/** /**
* *
*/ */
@ -389,7 +389,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
// 判断2个矩形是否相交 // 判断2个矩形是否相交
const rect1 = this.rectToolGraphics.getBounds(); const rect1 = this.rectToolGraphics.getBounds();
const rect2 = item.getBounds(); const rect2 = item.getBounds();
if (this.isOverlap(rect1, rect2)) { if (this.isOverlap(rect1, rect2) && item.interactive) {
shapes.push(item); shapes.push(item);
} }
} }
@ -408,7 +408,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
// 判断2个矩形是否相交 // 判断2个矩形是否相交
const rect1 = this.rectToolGraphics.getBounds(); const rect1 = this.rectToolGraphics.getBounds();
const rect2 = item.getBounds(); const rect2 = item.getBounds();
if (this.isOverlap(rect1, rect2)) { if (this.isOverlap(rect1, rect2) && item.interactive) {
shapes.push(item); shapes.push(item);
} }
} }
@ -458,7 +458,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
/** /**
* *
*/ */
private resetCamera2D() { public resetCamera2D() {
this.camera2D.scale.set(1); this.camera2D.scale.set(1);
this.camera2D.x = (this.app.view.width - this.backgroundImage.width) / 2; this.camera2D.x = (this.app.view.width - this.backgroundImage.width) / 2;
this.camera2D.y = (this.app.view.height - this.backgroundImage.height) / 2; this.camera2D.y = (this.app.view.height - this.backgroundImage.height) / 2;
@ -1021,7 +1021,9 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
// 创建处置预案图形 // 创建处置预案图形
this.createNodeShape(this.canvasData.selectPanelPoint.Data); this.createNodeShape(this.canvasData.selectPanelPoint.Data);
this.createAxLegend(); this.createAxLegend();
if (this.canvasData.gameMode == GameMode.Assignment) {
this.setLegendVisible(false);
}
this.updateCamera2D(); this.updateCamera2D();
} }
/** /**
@ -1409,7 +1411,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
* *
*/ */
public async onExamineeClickFloor() { public async onExamineeClickFloor() {
await this.refreshBackgroundImage(this.canvasData.selectStorey.imageUrl,this.canvasData.selectStorey.imageAngle); await this.refreshBackgroundImage(this.canvasData.selectStorey.imageUrl, this.canvasData.selectStorey.imageAngle);
// 清空所有图形 // 清空所有图形
this.deselectAll(); this.deselectAll();
const itemList = []; const itemList = [];
@ -1438,7 +1440,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
* - * -
*/ */
public async onExaminerClickFloor() { public async onExaminerClickFloor() {
await this.refreshBackgroundImage(this.canvasData.selectStorey.imageUrl,this.canvasData.selectStorey.imageAngle); await this.refreshBackgroundImage(this.canvasData.selectStorey.imageUrl, this.canvasData.selectStorey.imageAngle);
// 清空所有图形 // 清空所有图形
this.deselectAll(); this.deselectAll();
const itemList = []; const itemList = [];
@ -1466,7 +1468,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
* - * -
*/ */
public async onExaminerClickFloor_CreateTestpaper() { public async onExaminerClickFloor_CreateTestpaper() {
await this.refreshBackgroundImage(this.canvasData.selectStorey.imageUrl,this.canvasData.selectStorey.imageAngle); await this.refreshBackgroundImage(this.canvasData.selectStorey.imageUrl, this.canvasData.selectStorey.imageAngle);
// 清空所有图形 // 清空所有图形
this.deselectAll(); this.deselectAll();
const itemList = []; const itemList = [];
@ -1595,13 +1597,14 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
shape.hideBorder(); shape.hideBorder();
shape.setPointVisiable(false); shape.setPointVisiable(false);
} }
////////////////////////////////////////////////////////////////////////////////////////////////图例 //////////////////////////////////////////////////////////////////////////////////////////////// 图例
/** /**
* *
* @param b true false隐藏 * @param b true false隐藏
*/ */
public setLegendVisible(b: boolean): void { public setLegendVisible(b: boolean): void {
const legend = this.backgroundImage.getChildByName('图例') as AxLegend; const legend = this.backgroundImage.getChildByName('图例') as AxLegend;
legend.interactive = b;
legend.visible = b; legend.visible = b;
} }
} }

Loading…
Cancel
Save