Procházet zdrojové kódy

文本item修改;注释srelationitem

haojianlong před 5 roky
rodič
revize
3e41f778b0

+ 5 - 1
saga-web-big/src/items/STextItem.ts

@@ -106,7 +106,11 @@ export class STextItem extends SObjectItem {
     onDraw(painter: SPainter): void {
         this.width = painter.toPx(painter.textWidth(this.text));
         this.height = painter.toPx(this.font.size);
-        painter.font = this.font;
+        painter.font.textBaseLine = this.font.textBaseLine;
+        painter.font.textDirection = this.font.textDirection;
+        painter.font.textAlign = this.font.textAlign;
+        painter.font.name = this.font.name;
+        painter.font.size = painter.toPx(this.font.size);
         painter.brush.color = new SColor(this.color);
         painter.drawText(this.text, 0, 0, this.maxWidth);
     } // Function onDraw()

+ 28 - 28
saga-web-big/src/items/topology/SRelation.ts

@@ -9,32 +9,32 @@ import { SAnchorItem } from "./SAnchorItem";
  * * @author  郝建龙(1061851420@qq.com)
  */
 export abstract class SRelation extends SGraphyItem {
-    /** 起始端点线帽样式(枚举)    */
-    beginCap: SRelationState = SArrowStyleType.None;
-    /** 终止端点线帽样式(枚举)    */
-    endCap: SRelationState = SArrowStyleType.None;
-    /** 线帽填充色   */
-    capColor: SColor;
-    /** 外线颜色    */
-    color: SColor;
-    /** 起始锚点对象  */
-    startAnchor: SAnchorItem | null = null;
-    /** 终止锚点对象  */
-    endAnchor: SAnchorItem | null = null;
-    /** 内线颜色    */
-    innerLineColor: SColor;
-    /** 内线宽度    */
-    innerLineWidth: number = -1;
-    /** 虚线样式    */
-    lineDash: number[] = [];
-    /** 虚线偏移量   */
-    lineDashOffset: number = 0;
-    /** 动画速度    */
-    speed: number = 0;
-    /** 线宽  */
-    lineWidth: number;
-    /** 线状态 */
-    state: SRelationState = SRelationState.Normal;
-    /** 折点list  */
-    pointList: SPoint[] = [];
+    // /** 起始端点线帽样式(枚举)    */
+    // beginCap: SRelationState = SArrowStyleType.None;
+    // /** 终止端点线帽样式(枚举)    */
+    // endCap: SRelationState = SArrowStyleType.None;
+    // /** 线帽填充色   */
+    // capColor: SColor;
+    // /** 外线颜色    */
+    // color: SColor;
+    // /** 起始锚点对象  */
+    // startAnchor: SAnchorItem | null = null;
+    // /** 终止锚点对象  */
+    // endAnchor: SAnchorItem | null = null;
+    // /** 内线颜色    */
+    // innerLineColor: SColor;
+    // /** 内线宽度    */
+    // innerLineWidth: number = -1;
+    // /** 虚线样式    */
+    // lineDash: number[] = [];
+    // /** 虚线偏移量   */
+    // lineDashOffset: number = 0;
+    // /** 动画速度    */
+    // speed: number = 0;
+    // /** 线宽  */
+    // lineWidth: number;
+    // /** 线状态 */
+    // state: SRelationState = SRelationState.Normal;
+    // /** 折点list  */
+    // pointList: SPoint[] = [];
 } // Class SRelation