diff --git a/src/canvasController/canvasData/Data/ElementDataController.ts b/src/canvasController/canvasData/Data/ElementDataController.ts index e703eed..ce63676 100644 --- a/src/canvasController/canvasData/Data/ElementDataController.ts +++ b/src/canvasController/canvasData/Data/ElementDataController.ts @@ -27,7 +27,10 @@ export class ElementDataController implements IElementDataController { constructor(ctx: CanvasRenderingContext2D, settings: IStrokeSettings) { this.#ctx = ctx; - this.#settings = settings; + + //@ts-ignore + this.#settings = {}; + Object.assign(this.#settings, settings); this.#generateId(3); } diff --git a/src/canvasController/tools/pen.ts b/src/canvasController/tools/pen.ts index aaa4375..4f6e769 100644 --- a/src/canvasController/tools/pen.ts +++ b/src/canvasController/tools/pen.ts @@ -1,8 +1,5 @@ import { IStrokeSettings, IStrokeTool } from "./IStrokeTool"; -// todo: -// option for specific tool settings, like line stroke, color etc. -// like draw(x, y, { lineWidth: 3, strokeStyle: #fff }) export class Pen implements IStrokeTool { #context: CanvasRenderingContext2D; #type = "pen";