haojianlong 5 years ago
parent
commit
87afcd53d2

+ 2 - 2
saga-web-big/package.json

@@ -1,6 +1,6 @@
 {
     "name": "@saga-web/big",
-    "version": "1.0.71",
+    "version": "1.0.75",
     "description": "上格云建筑信息化库",
     "main": "lib/index.js",
     "types": "lib/index.d.js",
@@ -42,6 +42,6 @@
         "typescript": "^3.9.3"
     },
     "dependencies": {
-        "@saga-web/graph": "2.1.105"
+        "@saga-web/graph": "2.1.106"
     }
 }

+ 10 - 1
saga-web-big/src/items/floor/SSpaceItem.ts

@@ -89,6 +89,15 @@ export class SSpaceItem extends SGraphItem {
         this._nameTransform = value;
         this.update();
     } // Set nameTransform
+    /** 名字颜色    */
+    private _nameColor: string = "#000000";
+    get nameColor(): string {
+        return this._nameColor;
+    } // Get nameColor
+    set nameColor(value: string) {
+        this._nameColor = value;
+        this.update();
+    } // Set nameColor
 
     /**
      * 构造函数
@@ -218,7 +227,7 @@ export class SSpaceItem extends SGraphItem {
 
         if (this.showBaseName) {
             if (this.name && this.name != "null") {
-                painter.brush.color = SColor.Black;
+                painter.brush.color = new SColor(this.nameColor);
                 if (this.nameTransform) {
                     painter.font.size = this.nameSize;
                 } else {

+ 2 - 2
saga-web-fengmap/package.json

@@ -1,6 +1,6 @@
 {
     "name": "@saga-web/feng-map",
-    "version": "1.0.20",
+    "version": "1.0.23",
     "description": "上格云Web平面图。",
     "main": "lib/index.js",
     "types": "lib/index.d.js",
@@ -32,7 +32,7 @@
         "typescript": "^3.9.3"
     },
     "dependencies": {
-        "@saga-web/big": "1.0.68",
+        "@saga-web/big": "1.0.75",
         "axios": "^0.18.0"
     }
 }

+ 3 - 4
saga-web-fengmap/src/parser/SFengParser.ts

@@ -6,7 +6,6 @@ import { Column } from "@saga-web/big/lib/types/floor/Column";
 import { VirtualWall } from "@saga-web/big/lib/types/floor/VirtualWall";
 import { Wall } from "@saga-web/big/lib/types/floor/Wall";
 import Axios from "axios";
-import { Door } from "@saga-web/big/lib/types/floor/Door";
 
 /**
  * 蜂鸟数据解析器
@@ -252,7 +251,7 @@ export class SFengParser extends SParser {
         let searchAnalyser = new fengmap.FMSearchAnalyser(this.fmap);
         // 创建搜索请求体对象
         let searchReq = new fengmap.FMSearchRequest();
-        const maxx = this.fmap.maxX;
+        const minx = this.fmap.minX;
         const maxy = this.fmap.maxY;
         searchReq.groupID = groupId;
         searchReq.type = "Model";
@@ -270,7 +269,7 @@ export class SFengParser extends SParser {
                             outline = [];
                         for (let i = 0; i < arr.length - 1; i += 2) {
                             outline.push({
-                                X: arr[i] - maxx,
+                                X: arr[i] - minx,
                                 Y: arr[i + 1] - maxy
                             });
                         }
@@ -304,7 +303,7 @@ export class SFengParser extends SParser {
                         pList.push({
                             Name: t.target.name,
                             Pos: {
-                                X: t.mapCoord.x - maxx,
+                                X: t.mapCoord.x - minx,
                                 Y: t.mapCoord.y - maxy
                             },
                             Type: t.typeID,

+ 1 - 1
saga-web-graph/package.json

@@ -1,6 +1,6 @@
 {
     "name": "@saga-web/graph",
-    "version": "2.1.104",
+    "version": "2.1.106",
     "description": "上格云二维图形引擎。",
     "main": "lib/index.js",
     "types": "lib/index.d.js",

+ 1 - 1
saga-web-graph/src/SGraphItem.ts

@@ -124,7 +124,7 @@ export class SGraphItem extends SObject {
     /** 是否可被选中 */
     selectable = false;
     /** 是否被选中 */
-    private _selected = false;
+    protected _selected = false;
     get selected(): boolean {
         return this._selected && this.selectable && this.enabled;
     } // Get selected

+ 4 - 1
saga-web-graph/src/items/SObjectItem.ts

@@ -1,5 +1,5 @@
 import { SAnchorItem } from "./SAnchorItem";
-import { SSize } from "@saga-web/draw/lib";
+import { SPoint, SSize } from "@saga-web/draw/lib";
 import { SGraphItem } from "..";
 
 /**
@@ -46,6 +46,9 @@ export abstract class SObjectItem extends SGraphItem {
         }
     }
 
+    /** 原点  */
+    origin = new SPoint();
+
     /**
      * 宽高发发生变化
      *