Browse Source

fix: global set color

Konstantinos Kaloutas 2 năm trước cách đây
mục cha
commit
0831115ae6

+ 1 - 1
tldraw/packages/core/src/lib/TLApi/TLApi.ts

@@ -176,7 +176,7 @@ export class TLApi<S extends TLShape = TLShape, K extends TLEventMap = TLEventMa
     settings.update({ color: color })
     settings.update({ color: color })
 
 
     this.app.selectedShapesArray.forEach(s => {
     this.app.selectedShapesArray.forEach(s => {
-      s.update({ fill: color, stroke: color })
+      if (!s.props.isLocked) s.update({ fill: color, stroke: color })
     })
     })
     this.app.persist()
     this.app.persist()