haojianlong 5 år sedan
förälder
incheckning
5f0fdaff1f

+ 0 - 1
src/DivideFloorScene.ts

@@ -109,7 +109,6 @@ export class DivideFloorScene extends FloorScene {
     /**
      * 构造函数
      *
-     * @param   data
      */
     constructor() {
         super();

+ 18 - 17
src/FloorScene.ts

@@ -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

+ 4 - 4
src/LocationPointScene.ts

@@ -45,10 +45,10 @@ export class LocationPointScene extends FloorScene {
             return t;
         });
     } // Set isMarkSelectable
+
     /**
      * 构造函数
      *
-     * @param   data
      */
     constructor() {
         super();
@@ -57,7 +57,7 @@ export class LocationPointScene extends FloorScene {
     /**
      * 添加标志list至scene中
      *
-     * @param   marker    标志对象list
+     * @param   markerList  标志对象list
      */
     addMarkerList(markerList: Marker[]): void {
         markerList.map(t => {
@@ -70,7 +70,7 @@ export class LocationPointScene extends FloorScene {
      *
      * @param   marker  标志对象
      */
-    addMarker(marker: Marker) {
+    addMarker(marker: Marker): void {
         let mark = new MarkerItem(null, marker);
         mark.moveTo(marker.X, marker.Y);
         mark.selectable = this.isMarkSelectable;
@@ -84,7 +84,7 @@ export class LocationPointScene extends FloorScene {
      * @param   _this    接收者
      * @param   fn       处理函数
      */
-    markerClick(_this: any, fn: Function) {
+    markerClick(_this: any, fn: Function): void {
         this.markerList.map(m => {
             m.connect("click", _this, fn);
         });

+ 1 - 1
src/items/MarkItem.ts

@@ -22,7 +22,7 @@ import { Marker } from "../types/Marker";
 import { SGraphyItem } from "@saga-web/graphy/lib";
 import { SPainter, SRect } from "@saga-web/draw/lib";
 import { SMouseEvent } from "@saga-web/base/lib";
-import {ItemOrder} from "../types/ItemOrder";
+import { ItemOrder } from "../types/ItemOrder";
 
 /**
  * 标志item

+ 1 - 2
src/items/SceneMarkItem.ts

@@ -26,8 +26,7 @@ import {
     SPainter,
     SPath2D,
     SPoint,
-    SPolygonUtil,
-    SRect
+    SPolygonUtil
 } from "@saga-web/draw/lib";
 import { SMouseEvent } from "@saga-web/base/lib";
 import { ItemOrder } from "../types/ItemOrder";

+ 1 - 1
src/items/SpaceItem.ts

@@ -137,7 +137,7 @@ export class SpaceItem extends SGraphyItem {
      */
     onMouseMove(event: SMouseEvent): boolean {
         return false;
-    }
+    } // Function onMouseMove()
 
     /**
      * 判断点是否在区域内