diff --git a/projects/common/canvas-element-component.directive.ts b/projects/common/canvas-element-component.directive.ts index 830cf1967077242a6b94a482b992d6e023bb7c57..d094aeab922b1e5a1b8c0ed5d639b953f4ee0e66 100644 --- a/projects/common/canvas-element-component.directive.ts +++ b/projects/common/canvas-element-component.directive.ts @@ -14,7 +14,6 @@ export abstract class CanvasElementComponent implements OnInit { updateStyle(newProperties: Record<string, string> = {}): void { this.style = { - ...newProperties, width: `${this.elementModel.width}px`, height: `${this.elementModel.height}px`, 'background-color': this.elementModel.backgroundColor, @@ -23,7 +22,9 @@ export abstract class CanvasElementComponent implements OnInit { 'font-size': `${this.elementModel.fontSize}px`, 'font-weight': this.elementModel.bold ? 'bold' : '', 'font-style': this.elementModel.italic ? 'italic' : '', - 'text-decoration': this.elementModel.underline ? 'underline' : '' + 'text-decoration': this.elementModel.underline ? 'underline' : '', + ...this.style, + ...newProperties }; } }