zhaoyk 2 lat temu
rodzic
commit
b8ffd70794
1 zmienionych plików z 3 dodań i 0 usunięć
  1. 3 0
      adm_comp/src/lib/UIUtils.ts

+ 3 - 0
adm_comp/src/lib/UIUtils.ts

@@ -84,6 +84,9 @@ export class ViewTool {
 	}
 	
 	static drawText(ctx: CanvasRenderingContext2D, content: string, location: Point, size: Point):void{
+		if(!content)
+			return;
+			
 		const fontSize = 10;
 		ctx.font = "lighter " + fontSize + "px Microsoft YaHei";
 		ctx.textBaseline = "bottom";