Browse Source

更新big包

haojianlong 5 years ago
parent
commit
29ba3844c3

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

@@ -1,6 +1,6 @@
 {
 {
     "name": "@saga-web/big",
     "name": "@saga-web/big",
-    "version": "1.0.2",
+    "version": "1.0.4",
     "description": "上格云Web平面图。",
     "description": "上格云Web平面图。",
     "main": "lib/index.js",
     "main": "lib/index.js",
     "types": "lib/index.d.js",
     "types": "lib/index.d.js",

+ 1 - 1
saga-web-big/src/index.ts

@@ -43,5 +43,5 @@ export {
     STopologyParser,
     STopologyParser,
     SZoneParser,
     SZoneParser,
     SEquipParser,
     SEquipParser,
-    SBigParser,
+    SBigParser
 };
 };

+ 11 - 9
saga-web-big/src/items/floor/SSpaceItem.ts

@@ -191,14 +191,16 @@ export class SSpaceItem extends SGraphyItem {
         painter.pen.lineWidth = painter.toPx(1);
         painter.pen.lineWidth = painter.toPx(1);
         painter.drawPath(this.path);
         painter.drawPath(this.path);
 
 
-        painter.brush.color = SColor.Black;
-        painter.font.size = painter.toPx(10);
-        // painter.font.size = 500;
-        painter.font.textAlign = STextAlign.Center;
-        painter.drawText(
-            this.data.Name,
-            this.data.Location.Points[0].X,
-            -this.data.Location.Points[0].Y
-        );
+        if (this.data.Name && this.data.Name != "null") {
+            painter.brush.color = SColor.Black;
+            painter.font.size = painter.toPx(10);
+            // painter.font.size = 500;
+            painter.font.textAlign = STextAlign.Center;
+            painter.drawText(
+                this.data.Name,
+                this.data.Location.Points[0].X,
+                -this.data.Location.Points[0].Y
+            );
+        }
     } // Function onDraw()
     } // Function onDraw()
 } // Class SSpaceItem
 } // Class SSpaceItem