Ver código fonte

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

haojianlong 5 anos atrás
pai
commit
0355bc43d1

+ 1 - 1
saga-web-big/src/items/SLineItem.ts

@@ -36,7 +36,7 @@ export class SLineItem extends SGraphItem {
     }
 
     /** 是否完成绘制  */
-    private _status: SItemStatus = SItemStatus.Normal;
+    protected _status: SItemStatus = SItemStatus.Normal;
     get status(): SItemStatus {
         return this._status;
     }

+ 11 - 13
saga-web-graph/src/items/STextItem.ts

@@ -59,7 +59,7 @@ export class STextItem extends SObjectItem {
     }
 
     /** 边框色 */
-    private _strokeColor: SColor = SColor.Black;
+    private _strokeColor: SColor = SColor.Transparent;
     get strokeColor(): SColor {
         return this._strokeColor;
     }
@@ -132,23 +132,21 @@ export class STextItem extends SObjectItem {
     protected drawShowText(painter: SPainter): void {
         //绘制矩形轮廓
         if (this.selected) {
-            this.borderStyle = SLineStyle.Dashed;
+            painter.shadow.shadowBlur = 10;
+            painter.shadow.shadowColor = new SColor(`#00000060`);
+            painter.shadow.shadowOffsetX = 5;
+            painter.shadow.shadowOffsetY = 5;
         } else {
-            this.borderStyle = SLineStyle.None;
-        }
-        if (this.borderStyle == SLineStyle.Dashed) {
-            painter.pen.lineDash = [
-                this.lineWidth * 3,
-                this.lineWidth * 7
-            ];
-            painter.pen.lineWidth = this.lineWidth;
-            painter.brush.color = this.backgroundColor;
-            painter.pen.color = this.strokeColor;
-            painter.drawRect(this.boundingRect());
+            painter.shadow.shadowColor = SColor.Transparent;
         }
+        painter.brush.color = this.backgroundColor;
+        painter.pen.lineWidth = this.lineWidth;
+        painter.pen.color = this.strokeColor;
+        painter.drawRect(this.boundingRect());
 
         //绘制文本
         painter.brush.color = new SColor(this.color);
+        painter.shadow.shadowColor = SColor.Transparent;
         painter.font = this.font;
         this._textArr.forEach((text: string, index: number) => {
             painter.drawText(