haojianlong преди 4 години
родител
ревизия
90b56a9e53

+ 2 - 2
package.json

@@ -1,6 +1,6 @@
 {
     "name": "@saga-web/cad-engine",
-    "version": "2.0.568",
+    "version": "2.0.569",
     "description": "上格云 CAD图形引擎。",
     "main": "lib/index.js",
     "types": "lib/index.d.js",
@@ -28,7 +28,7 @@
         "eslint-plugin-prettier": "^3.1.0",
         "prettier": "^1.18.2",
         "ts-jest": "^24.0.2",
-        "typescript": "^3.5.3"
+        "typescript": "^3.9.7"
     },
     "dependencies": {
         "@saga-web/base": "2.1.27",

+ 2 - 2
src/DrawingScene.ts

@@ -18,7 +18,7 @@
  * ********************************************************************************************************************
  */
 
-import { SGraphyScene } from "@saga-web/graphy/lib";
+import { SGraphScene } from "@saga-web/graph/lib";
 import { SMouseEvent } from "@saga-web/base/lib";
 
 /**
@@ -26,7 +26,7 @@ import { SMouseEvent } from "@saga-web/base/lib";
  *
  * @author 郝建龙
  */
-export class DrawingScene extends SGraphyScene {
+export class DrawingScene extends SGraphScene {
     /** 画布状态    */
     sceneStatus: DrawStatus = DrawStatus.None;
 

+ 2 - 2
src/FloorScene.ts

@@ -18,7 +18,7 @@
  * ********************************************************************************************************************
  */
 
-import { SGraphyScene } from "@saga-web/graphy/lib";
+import { SGraphScene } from "@saga-web/graph/lib";
 // @ts-ignore
 import pako from "pako";
 import { FloorData } from "./types/FloorData";
@@ -43,7 +43,7 @@ import { SImageShowType } from "./enums/SImageShowType";
  *
  * @author  郝建龙
  */
-export class FloorScene extends SGraphyScene {
+export class FloorScene extends SGraphScene {
     /** item数据  */
     data: FloorData | null = null;
     /** json数据  */

+ 2 - 2
src/FloorView.ts

@@ -18,7 +18,7 @@
  * ********************************************************************************************************************
  */
 
-import { SGraphyItem, SGraphyView } from "@saga-web/graphy/lib";
+import { SGraphItem, SGraphView } from "@saga-web/graph/lib";
 import { SMouseButton, SMouseEvent, SNetUtil } from "@saga-web/base/lib";
 import { SPoint } from "@saga-web/draw/lib";
 
@@ -27,7 +27,7 @@ import { SPoint } from "@saga-web/draw/lib";
  *
  * @author  郝建龙
  */
-export class FloorView extends SGraphyView {
+export class FloorView extends SGraphView {
     /** 鼠标左键键按下时位置 */
     private _leftKeyPos = new SPoint();
     /** 空格是否被按下 */

+ 3 - 3
src/items/ColumnItem.ts

@@ -20,7 +20,7 @@
 
 import { Column } from "../types/Column";
 import { Opt } from "../types/Opt";
-import { SGraphyItem } from "@saga-web/graphy/lib";
+import { SGraphItem } from "@saga-web/graph/lib";
 import { SPainter, SPoint, SRect } from "@saga-web/draw/lib";
 import { ItemOrder } from "../types/ItemOrder";
 
@@ -29,7 +29,7 @@ import { ItemOrder } from "../types/ItemOrder";
  *
  * @author  郝建龙
  */
-export class ColumnItem extends SGraphyItem {
+export class ColumnItem extends SGraphItem {
     /** 柱子数据    */
     data: Column;
     /** X坐标最小值  */
@@ -49,7 +49,7 @@ export class ColumnItem extends SGraphyItem {
      * @param parent    指向父对象
      * @param data      柱子数据
      */
-    constructor(parent: SGraphyItem | null, data: Column) {
+    constructor(parent: SGraphItem | null, data: Column) {
         super(parent);
         this.data = data;
         this.zOrder = ItemOrder.columnOrder;

+ 3 - 3
src/items/DoorItem.ts

@@ -20,7 +20,7 @@
 
 import { Door } from "../types/Door";
 import { Opt } from "../types/Opt";
-import { SGraphyItem } from "@saga-web/graphy/lib";
+import { SGraphItem } from "@saga-web/graph/lib";
 import { SPainter, SPoint, SRect } from "@saga-web/draw/lib";
 import { SMathUtil } from "../utils/SMathUtil";
 import { ItemOrder } from "../types/ItemOrder";
@@ -30,7 +30,7 @@ import { ItemOrder } from "../types/ItemOrder";
  *
  * @author  郝建龙
  */
-export class DoorItem extends SGraphyItem {
+export class DoorItem extends SGraphItem {
     /** 门数据 */
     data: Door;
     /** 门轮廓线坐标list  */
@@ -58,7 +58,7 @@ export class DoorItem extends SGraphyItem {
      * @param parent    指向父对象
      * @param data      门数据
      */
-    constructor(parent: SGraphyItem | null, data: Door) {
+    constructor(parent: SGraphItem | null, data: Door) {
         super(parent);
         this.data = data;
         this.zOrder = ItemOrder.doorOrder;

+ 3 - 3
src/items/HighlightItem.ts

@@ -18,7 +18,7 @@
  * ********************************************************************************************************************
  */
 
-import { SGraphyItem } from "@saga-web/graphy/lib";
+import { SGraphItem } from "@saga-web/graph/lib";
 import { SColor, SLine, SPainter, SPoint, SRect } from "@saga-web/draw/lib";
 import { Opt } from "../types/Opt";
 import { ItemOrder } from "../types/ItemOrder";
@@ -28,7 +28,7 @@ import { ItemOrder } from "../types/ItemOrder";
  *
  * @author  郝建龙
  */
-export class HighlightItem extends SGraphyItem {
+export class HighlightItem extends SGraphItem {
     /** 对象与鼠标位置距离   */
     distance: number = 0;
     /** 对象类型   */
@@ -61,7 +61,7 @@ export class HighlightItem extends SGraphyItem {
      *
      * @param   parent  指向父对象
      */
-    constructor(parent: SGraphyItem | null) {
+    constructor(parent: SGraphItem | null) {
         super(parent);
         this.visible = false;
         this.zOrder = ItemOrder.highLightOrder;

+ 3 - 3
src/items/LikeSpaceItem.ts

@@ -18,7 +18,7 @@
  * ********************************************************************************************************************
  */
 
-import { SGraphyItem } from "@saga-web/graphy/lib";
+import { SGraphItem } from "@saga-web/graph/lib";
 import {
     SColor,
     SPainter,
@@ -37,7 +37,7 @@ import { Point } from "../types/Point";
  *
  * @author  郝建龙
  */
-export class LikeSpaceItem extends SGraphyItem {
+export class LikeSpaceItem extends SGraphItem {
     /** 类似空间所有数据  */
     data: Point[][];
     /** 空间轮廓线坐标list  */
@@ -68,7 +68,7 @@ export class LikeSpaceItem extends SGraphyItem {
      * @param parent    指向父对象
      * @param data      空间数据
      */
-    constructor(parent: SGraphyItem | null, data: Point[][]) {
+    constructor(parent: SGraphItem | null, data: Point[][]) {
         super(parent);
         this.data = data;
         this.zOrder = ItemOrder.likeSpaceOrder;

+ 3 - 3
src/items/MarkItem.ts

@@ -19,7 +19,7 @@
  */
 
 import { Marker } from "../types/Marker";
-import { SGraphyItem } from "@saga-web/graphy/lib";
+import { SGraphItem } from "@saga-web/graph/lib";
 import { SPainter, SRect } from "@saga-web/draw/lib";
 import { SMouseEvent } from "@saga-web/base/lib";
 import { ItemOrder } from "../types/ItemOrder";
@@ -29,7 +29,7 @@ import { ItemOrder } from "../types/ItemOrder";
  *
  * @author  郝建龙
  */
-export class MarkerItem extends SGraphyItem {
+export class MarkerItem extends SGraphItem {
     /** 标志宽度 */
     private width: number = 28;
     /** 标志高度 */
@@ -49,7 +49,7 @@ export class MarkerItem extends SGraphyItem {
      * @param parent    指向父对象
      * @param data      标志数据
      */
-    constructor(parent: SGraphyItem | null, data: Marker) {
+    constructor(parent: SGraphItem | null, data: Marker) {
         super(parent);
         this.data = data;
         this.zOrder = ItemOrder.markOrder;

+ 3 - 3
src/items/RectSelectItem.ts

@@ -18,7 +18,7 @@
  * ********************************************************************************************************************
  */
 
-import { SGraphyItem } from "@saga-web/graphy/lib";
+import { SGraphItem } from "@saga-web/graph/lib";
 import { SPainter, SPoint } from "@saga-web/draw/lib";
 import { SMouseEvent } from "@saga-web/base/lib";
 import { ItemOrder } from "../types/ItemOrder";
@@ -29,7 +29,7 @@ import { Opt } from "../types/Opt";
  *
  * @author  郝建龙
  */
-export class RectSelectItem extends SGraphyItem {
+export class RectSelectItem extends SGraphItem {
     /** 起点  */
     startPoint: SPoint = new SPoint();
     /** 终点  */
@@ -41,7 +41,7 @@ export class RectSelectItem extends SGraphyItem {
      * @param parent    指向父对象
      * @param point     起点数据
      */
-    constructor(parent: SGraphyItem | null, point: SPoint) {
+    constructor(parent: SGraphItem | null, point: SPoint) {
         super(parent);
         this.startPoint = point;
         this.endPoint = new SPoint(point.x, point.y);

+ 5 - 5
src/items/RelationItem.ts

@@ -19,7 +19,7 @@
  */
 
 import { Opt } from "../types/Opt";
-import { SGraphyItem } from "@saga-web/graphy/lib";
+import { SGraphItem } from "@saga-web/graph/lib";
 import { SColor, SPainter, SPoint } from "@saga-web/draw/lib";
 import { SMouseEvent } from "@saga-web/base/lib";
 import { ItemOrder } from "../types/ItemOrder";
@@ -30,7 +30,7 @@ import { RelationPoint } from "../types/RelationPoint";
  *
  * @author  郝建龙
  */
-export class RelationItem extends SGraphyItem {
+export class RelationItem extends SGraphItem {
     /** 是否闭合    */
     closeFlag = false;
     /** 起点  */
@@ -50,7 +50,7 @@ export class RelationItem extends SGraphyItem {
      * @param parent    指向父对象
      * @param data
      */
-    constructor(parent: SGraphyItem | null, data: SPoint); // Constructor
+    constructor(parent: SGraphItem | null, data: SPoint); // Constructor
 
     /**
      * 构造函数
@@ -58,7 +58,7 @@ export class RelationItem extends SGraphyItem {
      * @param parent    指向父对象
      * @param data      蒙版轮廓线数据
      */
-    constructor(parent: SGraphyItem | null, data: RelationPoint); // Constructor
+    constructor(parent: SGraphItem | null, data: RelationPoint); // Constructor
 
     /**
      * 构造函数
@@ -66,7 +66,7 @@ export class RelationItem extends SGraphyItem {
      * @param parent    指向父对象
      * @param data
      */
-    constructor(parent: SGraphyItem | null, data: SPoint | RelationPoint) {
+    constructor(parent: SGraphItem | null, data: SPoint | RelationPoint) {
         super(parent);
         if (data instanceof SPoint) {
             this.startPoint = data;

+ 2 - 2
src/items/SImageItem.ts

@@ -1,7 +1,7 @@
 import { SPainter, SRect, SSize, SColor, SPoint } from "@saga-web/draw/lib";
 import { SImageShowType, STextOrigin } from "..";
 import { SObjectItem } from "./SObjectItem";
-import { SGraphyItem } from "@saga-web/graphy/lib";
+import { SGraphItem } from "@saga-web/graph/lib";
 import { SMouseEvent } from "@saga-web/base/lib";
 
 /**
@@ -100,7 +100,7 @@ export class SImageItem extends SObjectItem {
      * @param   parent      指向父Item
      * @param   url         图片地址
      */
-    constructor(parent: SGraphyItem | null, url?: string) {
+    constructor(parent: SGraphItem | null, url?: string) {
         super(parent);
         if (url) this.url = url;
     } // Constructor

+ 2 - 2
src/items/SObjectItem.ts

@@ -1,12 +1,12 @@
 import { SPoint, SSize } from "@saga-web/draw/lib";
-import { SGraphyItem } from "@saga-web/graphy/lib";
+import { SGraphItem } from "@saga-web/graph/lib";
 
 /**
  * 对象item
  *
  * @author  郝建龙(1061851420@qq.com)
  */
-export abstract class SObjectItem extends SGraphyItem {
+export abstract class SObjectItem extends SGraphItem {
     /** 宽度  */
     private _width: number = 64;
     get width(): number {

+ 5 - 5
src/items/SceneMarkItem.ts

@@ -19,7 +19,7 @@
  */
 
 import { Opt } from "../types/Opt";
-import { SGraphyItem } from "@saga-web/graphy/lib";
+import { SGraphItem } from "@saga-web/graph/lib";
 import {
     SColor,
     SLineCapStyle,
@@ -38,7 +38,7 @@ import { SMathUtil } from "../utils/SMathUtil";
  *
  * @author  郝建龙
  */
-export class SceneMarkItem extends SGraphyItem {
+export class SceneMarkItem extends SGraphItem {
     /** 轮廓线坐标  */
     outLine: SPoint[] = [];
     /** 是否闭合    */
@@ -62,7 +62,7 @@ export class SceneMarkItem extends SGraphyItem {
      * @param parent    指向父对象
      * @param data      蒙版起点数据
      */
-    constructor(parent: SGraphyItem | null, data: SPoint); // Constructor
+    constructor(parent: SGraphItem | null, data: SPoint); // Constructor
 
     /**
      * 构造函数
@@ -70,7 +70,7 @@ export class SceneMarkItem extends SGraphyItem {
      * @param parent    指向父对象
      * @param data      蒙版轮廓线数据
      */
-    constructor(parent: SGraphyItem | null, data: SPoint[]); // Constructor
+    constructor(parent: SGraphItem | null, data: SPoint[]); // Constructor
 
     /**
      * 构造函数
@@ -78,7 +78,7 @@ export class SceneMarkItem extends SGraphyItem {
      * @param parent    指向父对象
      * @param data      蒙版起点数据 | 蒙版轮廓线数据
      */
-    constructor(parent: SGraphyItem | null, data: SPoint[] | SPoint) {
+    constructor(parent: SGraphItem | null, data: SPoint[] | SPoint) {
         super(parent);
         if (data instanceof Array) {
             this.outLine = data;

+ 5 - 5
src/items/ShadeItem.ts

@@ -19,7 +19,7 @@
  */
 
 import { Opt } from "../types/Opt";
-import { SGraphyItem } from "@saga-web/graphy/lib";
+import { SGraphItem } from "@saga-web/graph/lib";
 import {
     SColor,
     SLineCapStyle,
@@ -36,7 +36,7 @@ import { SMathUtil } from "../utils/SMathUtil";
  *
  * @author  郝建龙
  */
-export class ShadeItem extends SGraphyItem {
+export class ShadeItem extends SGraphItem {
     /** 轮廓线坐标  */
     outLine: SPoint[] = [];
     /** 是否闭合    */
@@ -50,7 +50,7 @@ export class ShadeItem extends SGraphyItem {
      * @param parent    指向父对象
      * @param data      遮罩起点数据
      */
-    constructor(parent: SGraphyItem | null, data: SPoint); // Constructor
+    constructor(parent: SGraphItem | null, data: SPoint); // Constructor
 
     /**
      * 构造函数
@@ -58,7 +58,7 @@ export class ShadeItem extends SGraphyItem {
      * @param parent    指向父对象
      * @param data      遮罩轮廓线数据
      */
-    constructor(parent: SGraphyItem | null, data: SPoint[]); // Constructor
+    constructor(parent: SGraphItem | null, data: SPoint[]); // Constructor
 
     /**
      * 构造函数
@@ -66,7 +66,7 @@ export class ShadeItem extends SGraphyItem {
      * @param parent    指向父对象
      * @param data      遮罩起点数据 | 遮罩轮廓线数据
      */
-    constructor(parent: SGraphyItem | null, data: SPoint[] | SPoint) {
+    constructor(parent: SGraphItem | null, data: SPoint[] | SPoint) {
         super(parent);
         if (data instanceof Array) {
             this.outLine = data;

+ 3 - 3
src/items/SpaceItem.ts

@@ -18,7 +18,7 @@
  * ********************************************************************************************************************
  */
 
-import { SGraphyItem } from "@saga-web/graphy/lib";
+import { SGraphItem } from "@saga-web/graph/lib";
 import {
     SColor,
     SPainter,
@@ -38,7 +38,7 @@ import { ItemOrder } from "../types/ItemOrder";
  *
  * @author  郝建龙
  */
-export class SpaceItem extends SGraphyItem {
+export class SpaceItem extends SGraphItem {
     /** 空间所有数据  */
     data: Space;
     /** 空间轮廓线坐标list  */
@@ -69,7 +69,7 @@ export class SpaceItem extends SGraphyItem {
      * @param parent    指向父对象
      * @param data      空间数据
      */
-    constructor(parent: SGraphyItem | null, data: Space) {
+    constructor(parent: SGraphItem | null, data: Space) {
         super(parent);
         this.data = data;
         this.zOrder = ItemOrder.spaceOrder;

+ 3 - 3
src/items/VirtualWallItem.ts

@@ -18,7 +18,7 @@
  * ********************************************************************************************************************
  */
 
-import { SGraphyItem } from "@saga-web/graphy/lib";
+import { SGraphItem } from "@saga-web/graph/lib";
 import { SPainter, SPoint, SRect } from "@saga-web/draw/lib";
 import { VirtualWall } from "../types/VirtualWall";
 import { Opt } from "../types/Opt";
@@ -29,7 +29,7 @@ import { ItemOrder } from "../types/ItemOrder";
  *
  * @author  郝建龙
  */
-export class VirtualWallItem extends SGraphyItem {
+export class VirtualWallItem extends SGraphItem {
     /** 虚拟墙数据   */
     data: VirtualWall;
     /** X坐标最小值  */
@@ -49,7 +49,7 @@ export class VirtualWallItem extends SGraphyItem {
      * @param parent    指向父对象
      * @param data      虚拟墙数据
      */
-    constructor(parent: SGraphyItem | null, data: VirtualWall) {
+    constructor(parent: SGraphItem | null, data: VirtualWall) {
         super(parent);
         this.data = data;
         this.zOrder = ItemOrder.virtualWallOrder;

+ 3 - 3
src/items/WallItem.ts

@@ -18,7 +18,7 @@
  * ********************************************************************************************************************
  */
 
-import { SGraphyItem } from "@saga-web/graphy/lib";
+import { SGraphItem } from "@saga-web/graph/lib";
 import { SPainter, SPoint, SRect } from "@saga-web/draw/lib";
 import { Wall } from "../types/Wall";
 import { Opt } from "../types/Opt";
@@ -29,7 +29,7 @@ import { ItemOrder } from "../types/ItemOrder";
  *
  * @author  郝建龙
  */
-export class WallItem extends SGraphyItem {
+export class WallItem extends SGraphItem {
     /** 墙数据 */
     data: Wall;
     /** X坐标最小值  */
@@ -49,7 +49,7 @@ export class WallItem extends SGraphyItem {
      * @param parent    指向父对象
      * @param data      墙数据
      */
-    constructor(parent: SGraphyItem | null, data: Wall) {
+    constructor(parent: SGraphItem | null, data: Wall) {
         super(parent);
         this.data = data;
         this.zOrder = ItemOrder.wallOrder;

+ 3 - 3
src/items/WindowItem.ts

@@ -18,7 +18,7 @@
  * ********************************************************************************************************************
  */
 
-import { SGraphyItem } from "@saga-web/graphy/lib";
+import { SGraphItem } from "@saga-web/graph/lib";
 import { SPainter, SPoint, SRect } from "@saga-web/draw/lib";
 import { Casement } from "../types/Casement";
 import { Opt } from "../types/Opt";
@@ -29,7 +29,7 @@ import { ItemOrder } from "../types/ItemOrder";
  *
  * @author  郝建龙
  */
-export class WindowItem extends SGraphyItem {
+export class WindowItem extends SGraphItem {
     /** 窗户数据    */
     data: Casement;
     /** 窗户轮廓线坐标list  */
@@ -49,7 +49,7 @@ export class WindowItem extends SGraphyItem {
      * @param parent    指向父对象
      * @param data      窗户数据
      */
-    constructor(parent: SGraphyItem | null, data: Casement) {
+    constructor(parent: SGraphItem | null, data: Casement) {
         super(parent);
         this.data = data;
         this.zOrder = ItemOrder.windowOrder;

+ 3 - 3
src/items/ZoneItem.ts

@@ -18,7 +18,7 @@
  * ********************************************************************************************************************
  */
 
-import { SGraphyItem } from "@saga-web/graphy/lib";
+import { SGraphItem } from "@saga-web/graph/lib";
 import {
     SColor,
     SPainter,
@@ -38,7 +38,7 @@ import { Transparency } from "../types/Transparency";
  *
  * @author  郝建龙
  */
-export class ZoneItem extends SGraphyItem {
+export class ZoneItem extends SGraphItem {
     /** 空间所有数据  */
     data: Zone;
     /** 空间轮廓线坐标list  */
@@ -97,7 +97,7 @@ export class ZoneItem extends SGraphyItem {
      * @param parent    指向父对象
      * @param data      空间数据
      */
-    constructor(parent: SGraphyItem | null, data: Zone) {
+    constructor(parent: SGraphItem | null, data: Zone) {
         super(parent);
         this.data = data;
         this.zOrder = ItemOrder.zoneOrder;