|
@@ -98,7 +98,7 @@ export class FloorScene extends SGraphyScene {
|
|
|
_isShowVirtualWall: boolean = true;
|
|
|
get isShowVirtualWall(): boolean {
|
|
|
return this._isShowVirtualWall;
|
|
|
- } // Get isShowVrtualWall
|
|
|
+ } // Get isShowVirtualWall
|
|
|
set isShowVirtualWall(v: boolean) {
|
|
|
if (this._isShowVirtualWall === v) {
|
|
|
return;
|
|
@@ -108,7 +108,7 @@ export class FloorScene extends SGraphyScene {
|
|
|
t.visible = this._isShowVirtualWall;
|
|
|
return t;
|
|
|
});
|
|
|
- } // Set isShowVrtualWall
|
|
|
+ } // Set isShowVirtualWall
|
|
|
|
|
|
/** 是否展示门 */
|
|
|
_isShowDoor: boolean = true;
|
|
@@ -172,7 +172,8 @@ export class FloorScene extends SGraphyScene {
|
|
|
spaceList: SpaceItem[] = [];
|
|
|
|
|
|
/**
|
|
|
- * @param data 绘制空间地图得所有参数
|
|
|
+ * 构造函数
|
|
|
+ *
|
|
|
*/
|
|
|
constructor() {
|
|
|
super();
|
|
@@ -207,7 +208,7 @@ export class FloorScene extends SGraphyScene {
|
|
|
console.log(res);
|
|
|
});
|
|
|
});
|
|
|
- } // Function loadUrl
|
|
|
+ } // Function loadUrl()
|
|
|
|
|
|
/**
|
|
|
* 解压数据
|
|
@@ -237,7 +238,7 @@ export class FloorScene extends SGraphyScene {
|
|
|
}
|
|
|
};
|
|
|
});
|
|
|
- } // Function unzip
|
|
|
+ } // Function unzip()
|
|
|
|
|
|
/**
|
|
|
* 获取楼层未压缩数据
|
|
@@ -265,7 +266,7 @@ export class FloorScene extends SGraphyScene {
|
|
|
console.log(err);
|
|
|
});
|
|
|
});
|
|
|
- } // Function getFloorData
|
|
|
+ } // Function getFloorData()
|
|
|
|
|
|
/**
|
|
|
* 增添所有底图item;
|
|
@@ -303,7 +304,7 @@ export class FloorScene extends SGraphyScene {
|
|
|
this.addSpace(t);
|
|
|
});
|
|
|
}
|
|
|
- } // Function addBaseMapItem
|
|
|
+ } // Function addBaseMapItem()
|
|
|
|
|
|
/**
|
|
|
* 添加空间到scene 中
|
|
@@ -316,7 +317,7 @@ export class FloorScene extends SGraphyScene {
|
|
|
item.selectable = this.isSpaceSelectable;
|
|
|
this.spaceList.push(item);
|
|
|
this.addItem(item);
|
|
|
- } // Function addSpace
|
|
|
+ } // Function addSpace()
|
|
|
|
|
|
/**
|
|
|
* 添加柱子到scene 中
|
|
@@ -328,7 +329,7 @@ export class FloorScene extends SGraphyScene {
|
|
|
item.visible = this.isShowColumn;
|
|
|
this.columnList.push(item);
|
|
|
this.addItem(item);
|
|
|
- } // Function addColumn
|
|
|
+ } // Function addColumn()
|
|
|
|
|
|
/**
|
|
|
* 添加墙到scene 中
|
|
@@ -340,7 +341,7 @@ export class FloorScene extends SGraphyScene {
|
|
|
item.visible = this.isShowWall;
|
|
|
this.wallList.push(item);
|
|
|
this.addItem(item);
|
|
|
- } // Function addWall
|
|
|
+ } // Function addWall()
|
|
|
|
|
|
/**
|
|
|
* 添加所有虚拟墙到scene中
|
|
@@ -352,7 +353,7 @@ export class FloorScene extends SGraphyScene {
|
|
|
item.visible = this.isShowVirtualWall;
|
|
|
this.virtualWallList.push(item);
|
|
|
this.addItem(item);
|
|
|
- } // Function addVirtualWall
|
|
|
+ } // Function addVirtualWall()
|
|
|
|
|
|
/**
|
|
|
* 添加门到scene 中
|
|
@@ -364,7 +365,7 @@ export class FloorScene extends SGraphyScene {
|
|
|
item.visible = this.isShowDoor;
|
|
|
this.doorList.push(item);
|
|
|
this.addItem(item);
|
|
|
- } // Function addDoor
|
|
|
+ } // Function addDoor()
|
|
|
|
|
|
/**
|
|
|
* 添加窗户到scene 中
|
|
@@ -376,7 +377,7 @@ export class FloorScene extends SGraphyScene {
|
|
|
item.visible = this.isShowWindow;
|
|
|
this.casementList.push(item);
|
|
|
this.addItem(item);
|
|
|
- } // Function addCasement
|
|
|
+ } // Function addCasement()
|
|
|
|
|
|
/**
|
|
|
* 解压文件
|
|
@@ -391,7 +392,7 @@ export class FloorScene extends SGraphyScene {
|
|
|
let binData = new Uint8Array(charData);
|
|
|
let data = pako.inflate(binData, { to: "string" });
|
|
|
return eval("(" + data + ")");
|
|
|
- } // Function unzipBase64
|
|
|
+ } // Function unzipBase64()
|
|
|
|
|
|
/**
|
|
|
* 压缩文件
|
|
@@ -402,7 +403,7 @@ export class FloorScene extends SGraphyScene {
|
|
|
//escape(str) --->压缩前编码,防止中午乱码
|
|
|
let binaryString = pako.gzip(escape(str), { to: "string" });
|
|
|
return binaryString;
|
|
|
- } // Function zip
|
|
|
+ } // Function zip()
|
|
|
|
|
|
/**
|
|
|
* 获取选中空间的列表
|
|
@@ -417,7 +418,7 @@ export class FloorScene extends SGraphyScene {
|
|
|
}
|
|
|
});
|
|
|
return arr;
|
|
|
- } // Function getSelectedSpaces
|
|
|
+ } // Function getSelectedSpaces()
|
|
|
|
|
|
/**
|
|
|
* 清除选中的空间
|
|
@@ -428,5 +429,5 @@ export class FloorScene extends SGraphyScene {
|
|
|
sp.selected = false;
|
|
|
return sp;
|
|
|
});
|
|
|
- } // Function clearSelectedSpaces
|
|
|
+ } // Function clearSelectedSpaces()
|
|
|
} // Class FloorScene
|