Sfoglia il codice sorgente

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

YaolongHan 4 anni fa
parent
commit
20058689d5
2 ha cambiato i file con 7 aggiunte e 2 eliminazioni
  1. 3 1
      persagy-web-draw/src/SBrush.ts
  2. 4 1
      persagy-web-draw/src/SColor.ts

+ 3 - 1
persagy-web-draw/src/SBrush.ts

@@ -102,7 +102,9 @@ export class SBrush {
             this.color = new SColor(brush.color);
         } else {
             // 实现重载 constructor(color: SColor);
-            this.color = new SColor(brush);
+            this.color = new SColor(
+
+            );
         }
     }
 }

+ 4 - 1
persagy-web-draw/src/SColor.ts

@@ -69,6 +69,8 @@ export class SColor {
     /** 浅灰色 */
     static readonly LightGray = new SColor("#C0C0C0");
 
+    static readonly pp = new SColor(113, 168, 28, 255);
+
     /**
      * 根据 rgb 分量生成颜色
      *
@@ -273,6 +275,7 @@ export class SColor {
      * @return 6 位 16 进制颜色
      */
     toVal(): string {
-        return "#" + SStringUtil.num2Hex(this._value, 6);
+        const v = this.value;
+        return v.substring(0, v.length - 2);
     }
 }