From 217b33dd7fe920e2efcb0ad02e7cfca3b0b8e1c4 Mon Sep 17 00:00:00 2001 From: Erik Onarheim Date: Mon, 30 Sep 2024 21:40:13 -0500 Subject: [PATCH] fix: Graphic set internal width/height from ctor --- src/engine/Graphics/Graphic.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/engine/Graphics/Graphic.ts b/src/engine/Graphics/Graphic.ts index a66f392db..398bb2f13 100644 --- a/src/engine/Graphics/Graphic.ts +++ b/src/engine/Graphics/Graphic.ts @@ -154,6 +154,13 @@ export abstract class Graphic { this.opacity = options.opacity ?? this.opacity; this.scale = options.scale ?? this.scale; this.tint = options.tint ?? this.tint; + if (options.width) { + this._width = options.width; + } + + if (options.height) { + this._height = options.height; + } } }