Quellcode durchsuchen

底层支持库版本更新

haojianlong vor 4 Jahren
Ursprung
Commit
2b46470316
3 geänderte Dateien mit 14 neuen und 13 gelöschten Zeilen
  1. 7 7
      package-lock.json
  2. 3 3
      package.json
  3. 4 3
      src/items/SpaceItem.ts

+ 7 - 7
package-lock.json

@@ -30,19 +30,19 @@
             "integrity": "sha512-V5Xgh02IFmRgM0/7Hkm34RFS/VHepK7786LefuJLyuRh0B48DNJSPrkBAgad5Rl5VM76c8hSQikiS/fyuy7nDQ=="
         },
         "@saga-web/draw": {
-            "version": "2.1.78",
-            "resolved": "http://dev.dp.sagacloud.cn:8082/repository/npm-saga/@saga-web/draw/-/draw-2.1.78.tgz",
-            "integrity": "sha512-OpR92iJduF6FzLRuSVLWLp4heEbbC1M2d1V+zpI1ZSNvDqd+3sIgT1PhpcoIEz4s/vSZMHcFgPIrjAKB5swEgA==",
+            "version": "2.1.80",
+            "resolved": "http://dev.dp.sagacloud.cn:8082/repository/npm-saga/@saga-web/draw/-/draw-2.1.80.tgz",
+            "integrity": "sha512-NR1ingLeebY/r2Z/KhelngSkQS8rB+tSlmDvjgxZPbsOX+OO077iZ0foQEq4pDLf2leRYDMKLTz3nwecHfbpeg==",
             "requires": {
                 "@saga-web/base": "^2.1.9"
             }
         },
         "@saga-web/graphy": {
-            "version": "2.1.50",
-            "resolved": "http://dev.dp.sagacloud.cn:8082/repository/npm-saga/@saga-web/graphy/-/graphy-2.1.50.tgz",
-            "integrity": "sha512-+dDIfBNjFfoiHleBBoQnl4oT7IaZ3tc1AfVXqDGW1ZXQvoQGWQt2i8er58ygLEHIRj0F0HLN3vWjibvLLLAPEA==",
+            "version": "2.1.52",
+            "resolved": "http://dev.dp.sagacloud.cn:8082/repository/npm-saga/@saga-web/graphy/-/graphy-2.1.52.tgz",
+            "integrity": "sha512-64Kvrg7bDR1QT4N+MM56rOZePNMLv46m525leqkVr1cUHfh11kZy3PcUchth0tN6oqXghT3KmQGDVpngKNHs+A==",
             "requires": {
-                "@saga-web/draw": "^2.1.78"
+                "@saga-web/draw": "2.1.80"
             }
         },
         "@types/eslint-visitor-keys": {

+ 3 - 3
package.json

@@ -1,6 +1,6 @@
 {
     "name": "@saga-web/cad-engine",
-    "version": "2.0.564",
+    "version": "2.0.565",
     "description": "上格云 CAD图形引擎。",
     "main": "lib/index.js",
     "types": "lib/index.d.js",
@@ -32,8 +32,8 @@
     },
     "dependencies": {
         "@saga-web/base": "2.1.9",
-        "@saga-web/draw": "2.1.78",
-        "@saga-web/graphy": "2.1.50",
+        "@saga-web/draw": "2.1.80",
+        "@saga-web/graphy": "2.1.52",
         "axios": "^0.18.0",
         "pako": "^1.0.10",
         "poly-decomp": "^0.3.0",

+ 4 - 3
src/items/SpaceItem.ts

@@ -21,15 +21,15 @@
 import { SGraphyItem } from "@saga-web/graphy/lib";
 import {
     SColor,
-    SGradient,
     SPainter,
     SPath2D,
     SPoint,
     SPolygonUtil,
-    SRect
+    SRect,
+    STextAlign
 } from "@saga-web/draw/lib";
 import { Space } from "../types/Space";
-import { Opt } from "../types/Opt";
+import { Opt } from "..";
 import { SMouseEvent } from "@saga-web/base/lib";
 import { ItemOrder } from "../types/ItemOrder";
 
@@ -194,6 +194,7 @@ export class SpaceItem extends SGraphyItem {
         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,