Explorar el Código

图片加载失败时刷新item绘制边框

zhangyu hace 5 años
padre
commit
da582e6896
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      saga-web-graph/src/items/SImageItem.ts

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

@@ -38,8 +38,9 @@ export class SImageItem extends SObjectItem {
             this.isLoadOver = true;
             this.update();
         };
-        this.img.onerror = (e) => {
+        this.img.onerror = (e): void => {
             this.isLoadOver = false;
+            this.update();
             console.log("加载图片错误!");
             console.log(e);
         }