Browse Source

'图标显示问题修改'

zhangyu 4 years ago
parent
commit
e0918d6327
1 changed files with 2 additions and 4 deletions
  1. 2 4
      src/lib/items/SImageLegendItem.ts

+ 2 - 4
src/lib/items/SImageLegendItem.ts

@@ -66,17 +66,15 @@ export class SImageLegendItem extends SIconTextItem {
         this.data = data;
         this.id = data.ID;
         this.name = data.Name;
+        this.text = data.Name;
         this.moveTo(data.Pos.X, data.Pos.Y);
         if (data.Num) {
-            this._num = data.Num;
+            this.num = data.Num;
         }
         if (data.Size) {
             this.width = data.Size.Width;
             this.height = data.Size.Height;
         }
-        if (data.Num) {
-            this.text = `${data.Name}${data.Num > 1 ? ` × ${data.Num}` : ''}`;
-        }
         if (data.Properties && data.Properties.Url) {
             this.img.url = data.Properties.Url;
         }