Kaynağa Gözat

Merge branch 'master' of http://39.106.8.246:3003/web/persagy-web

haojianlong 4 yıl önce
ebeveyn
işleme
03bad0e29c

+ 4 - 2
persagy-web-big-edit/src/items/SBaseEquipment.ts

@@ -56,7 +56,7 @@ export class SBaseEquipment extends SBaseIconTextEdit {
         return this._infoPointList
     } // get infoPointList()
 
-    defaultUrl:string = '';
+    defaultUrl: string = '';
     /** 图得url */
     _url: string = '';
     set url(val) {
@@ -251,7 +251,9 @@ export class SBaseEquipment extends SBaseIconTextEdit {
             this.legendData.properties.infoPointList = infoPoinList;
             this.legendData.properties.anotherMsg = this.anotherMsg;
             this.legendData.style.default.base64Url = "";
-            this.legendData.style.default.url = this.defaultUrl;
+            if (this.defaultUrl) {
+                this.legendData.style.default.url = this.defaultUrl;
+            }
             return this.legendData
         }
     }

+ 2 - 0
persagy-web-big-edit/src/items/SBasePipe.ts

@@ -110,6 +110,8 @@ export class SBasePipe extends SBasePolylineEdit {
     constructor(parent: SGraphItem | null, data: Relation) {
         super(parent);
         this.relationData = data;
+           // 求掉选中框
+        this.showSelect = false;
     }
 
     /**

+ 6 - 0
persagy-web-big-edit/src/until.ts

@@ -39,6 +39,12 @@ export function svgTobase64(url: string) {
     if (url.includes(".svg")) {
       axios.get(url).then((res) => {
         if (res.data) {
+          const regexp = /\<\?xml .*\?\>/i,
+            newXml = '<?xml version="1.0" encoding="UTF-8"?>';
+          res.data = res.data.replace(regexp, newXml);
+          if ("<?xml".indexOf(res.data) === -1) {
+            res.data = '<?xml version="1.0" encoding="UTF-8"?>' + res.data;
+          }
           const index = res.data.indexOf('"UTF-8"?>');
           const str = res.data.substr(index + 9);
           const a = crypto.enc.Utf8.parse(str);

+ 1 - 1
persagy-web-edit/src/type/Legend.ts

@@ -25,7 +25,7 @@
  */
 
 import { Anchor } from "./Anchor";
-import { Point } from "./Point";
+import { Point } from "@persagy-web/graph";
 import { Size } from "@persagy-web/big/lib/types/Size";
 import { SPoint } from '@persagy-web/draw/lib';