From 65f218b100a90b6b5b18c1f1865d443b8991aeb0 Mon Sep 17 00:00:00 2001 From: Ashwin Temkar <83207402+rothardo@users.noreply.github.com> Date: Sat, 25 Jan 2025 21:35:50 +0530 Subject: [PATCH] fix: excalidraw issue #9045 flowcharts: align attributes of new node (#9047) * fix: excalidraw#9045 by modifying the stroke style, opacity, and fill style for the new node and next nodes. * fix: added roughness and opacity to the arrowbindings --- packages/excalidraw/element/flowchart.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/excalidraw/element/flowchart.ts b/packages/excalidraw/element/flowchart.ts index ebba11d83..fad72560b 100644 --- a/packages/excalidraw/element/flowchart.ts +++ b/packages/excalidraw/element/flowchart.ts @@ -254,6 +254,9 @@ const addNewNode = ( backgroundColor: element.backgroundColor, strokeColor: element.strokeColor, strokeWidth: element.strokeWidth, + opacity: element.opacity, + fillStyle: element.fillStyle, + strokeStyle: element.strokeStyle, }); invariant( @@ -329,6 +332,9 @@ export const addNewNodes = ( backgroundColor: startNode.backgroundColor, strokeColor: startNode.strokeColor, strokeWidth: startNode.strokeWidth, + opacity: startNode.opacity, + fillStyle: startNode.fillStyle, + strokeStyle: startNode.strokeStyle, }); invariant( @@ -421,6 +427,8 @@ const createBindingArrow = ( strokeColor: startBindingElement.strokeColor, strokeStyle: startBindingElement.strokeStyle, strokeWidth: startBindingElement.strokeWidth, + opacity: startBindingElement.opacity, + roughness: startBindingElement.roughness, points: [pointFrom(0, 0), pointFrom(endX, endY)], elbowed: true, });