diff --git a/src/index.tsx b/src/index.tsx index 950521c91..1b9c76b47 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -965,7 +965,17 @@ function restore( ? JSON.parse(savedElements) : savedElements) ); - elements.forEach((element: ExcalidrawElement) => generateDraw(element)); + elements.forEach((element: ExcalidrawElement) => { + element.fillStyle = element.fillStyle || "hachure"; + element.strokeWidth = element.strokeWidth || 1; + element.roughness = element.roughness || 1; + element.opacity = + element.opacity === null || element.opacity === undefined + ? 100 + : element.opacity; + + generateDraw(element); + }); } return savedState ? JSON.parse(savedState) : null; @@ -1508,6 +1518,213 @@ class App extends React.Component<{}, AppState> { +

Colors

+
+
Shape Stroke Color
+
+
+ + {hasBackground() && ( +
+
Shape Background Color
+
+
+ )} + + {hasBackground() && ( + <> +

Fill

+
+ + + + + + + +
+ + )} + + {hasStroke() && ( + <> +

Stroke width

+
+ +
+ +

Roughness

+
+ +
+ + )} + +

Opacity

+ )}

Canvas

@@ -1602,229 +1819,6 @@ class App extends React.Component<{}, AppState> { Load file...
- {someElementIsSelected() && ( - <> - <> -

Colors

-
-
Shape Stroke Color
-
-
- - {hasBackground() && ( -
-
Shape Background Color
-
-
- )} - - - {hasBackground() && ( - <> -

Fill

-
- - - - - - - - -
- - )} - - {hasStroke() && ( - <> -

Stroke width

-
- -
- -

Roughness

-
- -
- - )} - -

Opacity

- - - )}