fix: edgeless pencil color

This commit is contained in:
alt0
2022-10-10 18:33:15 +08:00
parent 09dea80a08
commit f647905279
2 changed files with 4 additions and 1 deletions
@@ -109,7 +109,7 @@ export const useShapes = (workspace: string, rootBlockId: string) => {
parentId: rootBlockId,
...shapeProps,
id: block.id,
style: { ...defaultStyle },
style: { ...defaultStyle, ...(shapeProps.style || {}) },
workspace,
};
} else {
@@ -128,6 +128,7 @@ export const useShapes = (workspace: string, rootBlockId: string) => {
return acc;
}, {} as Record<string, TDShape>);
console.log('useShapes', blocksShapes);
return {
shapes: blocksShapes,
@@ -35,6 +35,8 @@ const _getIconRenderColor = (shapes: TDShape[]) => {
export const BorderColorConfig = ({ app, shapes }: BorderColorConfigProps) => {
const setBorderColor = (color: string) => {
console.log('shapes', shapes, color);
app.style({ stroke: color }, getShapeIds(shapes));
};