Bläddra i källkod

'图标默认url地址修改为空字符串'

zhangyu 5 år sedan
förälder
incheckning
d86e9675ea
2 ändrade filer med 2 tillägg och 2 borttagningar
  1. 1 1
      saga-web-big/src/items/SIconTextItem.ts
  2. 1 1
      saga-web-graph/src/items/SImageItem.ts

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

@@ -181,7 +181,7 @@ export class SIconTextItem extends SObjectItem {
      * */
     constructor(parent: SGraphItem | null, data?: Anchor[]) {
         super(parent);
-        this.img.url = `http://adm.sagacloud.cn:8080/doc/assets/img/logo.png`;
+        this.img.url = "";
         this.img.width = 32;
         this.img.height = 32;
         this.img.origin = new SPoint(this.img.width * 0.5, this.img.height * 0.5);

+ 1 - 1
saga-web-graph/src/items/SImageItem.ts

@@ -157,7 +157,7 @@ export class SImageItem extends SObjectItem {
      */
     onDraw(painter: SPainter): void {
         painter.translate(-this.origin.x, -this.origin.y);
-        if (this.isLoadOver) {
+        if (this.isLoadOver && this.url) {
             // @ts-ignore
             painter.drawImage(this.img, 0, 0, this.imgWidth, this.imgHeight);
         }