Browse Source

[新增] 放大单选图标

develop
徐振升 4 years ago
parent
commit
e71e598ecb
  1. 22
      src/app/working-area/working-area.component.ts

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

@ -113,7 +113,6 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
const delY = this.mousePosition.y - this.backgroundImage.position.y;
const pivot = this.backgroundImage.toLocal(this.mousePosition);
const delta = Math.max(-1, Math.min(1, (event.wheelDelta || -event.detail)));
if (delta > 0) {
if (this.backgroundImage.scale.x >= 32) {
this.backgroundImage.scale.x = 32;
@ -165,7 +164,7 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
// obj.assetData.Name = '这是我修改了的名字';
// console.log(this.canvasData.originaleveryStoreyData.data[obj.assetData.Id]);
// console.log(this.canvasData.originalcompanyBuildingData.data[obj.assetData.Id]);
if (obj instanceof MultipointIcon) {
if (obj instanceof MultipointIcon) {
obj.setPointVisiable(true);
} else if (obj instanceof PolygonIcon) {
obj.setPointVisiable(true);
@ -210,6 +209,21 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
}
});
}
/**
*
* @param value
*/
public setIconScale(value: number): void {
this.backgroundImage.children.forEach(item => {
if (item instanceof SinglePointIcon) {
item.scale.set(value);
} else if (item instanceof MultipointIcon) {
} else if (item instanceof PolygonIcon) {
}
});
}
/**
*
*/
@ -280,8 +294,8 @@ export class WorkingAreaComponent extends EventEmitter implements OnInit, AfterV
*
*/
public versionChecking(): void {
let floorData = this.canvasData.originaleveryStoreyData;
let buildingData = this.canvasData.originalcompanyBuildingData;
const floorData = this.canvasData.originaleveryStoreyData;
const buildingData = this.canvasData.originalcompanyBuildingData;
if (floorData.version && floorData.version === '1.0') {
floorData.version = '2.0';
Object.keys(floorData.data).forEach(item => {

Loading…
Cancel
Save