Browse Source

补充提交

develop
徐振升 4 years ago
parent
commit
30f542598a
  1. 7
      src/app/working-area/working-area.component.ts

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

@ -522,6 +522,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
this.paintingIcon = new MultipointIcon(assetData1, this);
// this.paintingIcon = new MultipointIcon(this.previewSinglePointIcon.texture, new PIXI.Point(0, 0), this.paintPoints, this,
// this.canvasData.selectTemplateData.name);
this.emit('backgroundScale', this.backgroundImage.scale.x);
break;
case PaintMode.polygonIcon:
this.previewLineSegment.visible = true;
@ -821,6 +822,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
break;
}
this.paintPoints.splice(0, this.paintPoints.length);
this.emit('backgroundScale', this.backgroundImage.scale.x);
}
/**
*
@ -1377,6 +1379,11 @@ export class PolygonIcon extends PIXI.Container {
.on('rightclick', event => {
// this.workingArea.selection.deselectAll();
});
// 缩放
this.workingArea.on('backgroundScale', data => {
const scale = 1 / data;
this.text.scale.set(scale);
});
}
/**
*

Loading…
Cancel
Save