Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
chore(script_deployer): fix thickness in XOPP import
Elian Doran857459398912
diff --git a/apps/script-deployer/scripts/import-xopp-to-canvas.tsx b/apps/script-deployer/scripts/import-xopp-to-canvas.tsxindex 8e7fd26b40..71e761d164 100644--- a/apps/script-deployer/scripts/import-xopp-to-canvas.tsx+++ b/apps/script-deployer/scripts/import-xopp-to-canvas.tsx@@ -91,7 +91,7 @@ function makeBaseElement(type: string, x: number, y: number, width: number, heigstrokeColor: "#000000",backgroundColor: "transparent",fillStyle: "solid",- strokeWidth: 2,+ strokeWidth: 1,strokeStyle: "solid",roughness: 0,opacity: 100,@@ -163,7 +163,8 @@ function convertStroke(strokeEl: Element, yOffset: number): ExcalidrawElement |el.pressures = hasPressure ? pressures : [];el.simulatePressure = !hasPressure;el.strokeColor = convertColor(color);- el.strokeWidth = widths[0] || 2;+ el.strokeWidth = Math.floor(widths[0] || 1);+ console.log("Stroke width ", widths[0], el.strokeWidth);el.opacity = isHighlighter ? 40 : extractOpacity(color);el.lastCommittedPoint = points[points.length - 1] || null;