瀏覽代碼

feat:tiaohis

YaolongHan 4 年之前
父節點
當前提交
c5498ec153
共有 2 個文件被更改,包括 10 次插入0 次删除
  1. 1 0
      src/lib/items/SImageLegendItem.ts
  2. 9 0
      src/lib/items/SImgTextItem.ts

+ 1 - 0
src/lib/items/SImageLegendItem.ts

@@ -31,6 +31,7 @@ export class SImageLegendItem extends SImgTextItem {
         this.update();
     }
 
+
     /**
      * 构造函数
      *

+ 9 - 0
src/lib/items/SImgTextItem.ts

@@ -60,6 +60,15 @@ export class SImgTextItem extends SObjectItem {
     this.update();
   } // Set y
 
+  /** icon宽 */
+  get width(): number {
+    return this.img.width;
+  }
+  set width(v: number) {
+    this.img.width = v
+    this.update();
+  }
+
   /** 是否显示锚点  */
   _showAnchor: boolean = false;
   get showAnchor(): boolean {