diff --git a/tldraw/packages/core/src/lib/TLApi/TLApi.ts b/tldraw/packages/core/src/lib/TLApi/TLApi.ts index d8ecef054b..8330db91ce 100644 --- a/tldraw/packages/core/src/lib/TLApi/TLApi.ts +++ b/tldraw/packages/core/src/lib/TLApi/TLApi.ts @@ -168,13 +168,27 @@ export class TLApi { const { settings } = this.app + settings.update({ color: color }) + + this.app.selectedShapesArray.forEach(s => { + s.update({ fill: color, stroke: color }) + }) + this.app.persist() + return this } setOpacity = (opacity: number): this => { const { settings } = this.app + settings.update({ opacity: opacity }) + + this.app.selectedShapesArray.forEach(s => { + s.update({ opacity: opacity }) + }) + this.app.persist() + return this }