Browse Source

[新增] 整理绘制逻辑

develop
徐振升 5 years ago
parent
commit
9126bae75b
  1. 22
      src/app/working-area/working-area.component.ts

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

@ -527,11 +527,27 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
this.circleShadow.visible = false;
this.backgroundImage.addChild(this.circleShadow);
}
/**
*
*/
public beginPaint(data: any) {
switch (data.interactiveMode) {
case 0:
this.beginPaintSinglePointIcon(data.imageUrl);
break;
case 1:
this.beginPaintLineIcon(data.imageUrl);
break;
case 2:
this.beginPaintPolygonIcon();
break;
}
}
/**
*
* @param imageUri
*/
public beginPaintSinglePointIcon(imageUri: string): void {
private beginPaintSinglePointIcon(imageUri: string): void {
this.cancelPaint();
this.paintMode = PaintMode.singlePointIcon;
this.changePreviewSinglePointIcon(imageUri);
@ -539,7 +555,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
/**
*
*/
public beginPaintPolygonIcon(): void {
private beginPaintPolygonIcon(): void {
this.cancelPaint();
this.paintMode = PaintMode.polygonIcon;
this.circleShadow.visible = true;
@ -548,7 +564,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
*
* @param imageUri
*/
public beginPaintLineIcon(imageUri: string): void {
private beginPaintLineIcon(imageUri: string): void {
this.cancelPaint();
this.paintMode = PaintMode.lineIcon;
this.previewSinglePointIcon.texture = PIXI.Texture.from(imageUri);

Loading…
Cancel
Save