Skip to content

Virtual whiteboard for sketching hand-drawn like diagrams

update simplifier distance to reflect zoom (#2004)

wasp775f195694ee59
diff --git a/src/components/App.tsx b/src/components/App.tsx
index 5f77426a36..a07adcbe4b 100644
--- a/src/components/App.tsx
+++ b/src/components/App.tsx
@@ -2892,7 +2892,10 @@ class App extends React.Component<ExcalidrawProps, AppState> {
} else if (points.length > 1) {
if (draggingElement.type === "draw") {
mutateElement(draggingElement, {
- points: simplify([...(points as Point[]), [dx, dy]], 0.7),
+ points: simplify(
+ [...(points as Point[]), [dx, dy]],
+ 0.7 / this.state.zoom,
+ ),
});
} else {
mutateElement(draggingElement, {