diff --git a/components/templates/generator.js b/components/templates/generator.js index e1b08ab..8f377c2 100644 --- a/components/templates/generator.js +++ b/components/templates/generator.js @@ -72,8 +72,11 @@ export default function Generator() { } const canvas = document.getElementById("canvas"); - if (!canvas.getContext) { - console.log("canvas err"); + console.log("Canvas element:", canvas); + if (!canvas || !canvas.getContext) { + console.log("canvas not found or no context available"); + console.log("canvas exists:", !!canvas); + console.log("getContext available:", canvas ? !!canvas.getContext : false); return; } @@ -154,7 +157,6 @@ export default function Generator() { rows={8} onChange={(e) => { setProfil(e.target.value); - getPath(e, e.target.value); }} className="font-mono text-sm" /> @@ -203,24 +205,46 @@ export default function Generator() { - +
+ + + +
@@ -238,23 +262,23 @@ export default function Generator() { - {previewVisible ? ( -
- -
- ) : ( -
-
- +
+ + {!previewVisible && ( +
+
+ +
+

Wprowadź dane i kliknij "Podgląd" aby zobaczyć profil

-

Wprowadź dane aby zobaczyć podgląd profilu

-
- )} + )} +
@@ -281,6 +305,12 @@ export default function Generator() {
3
+

Kliknij "Podgląd" aby zobaczyć wizualizację profilu

+
+
+
+ 4 +

Kliknij "Generuj profil" aby pobrać plik DXF

diff --git a/components/ui/Layout.js b/components/ui/Layout.js index d1615dd..6440698 100644 --- a/components/ui/Layout.js +++ b/components/ui/Layout.js @@ -77,7 +77,7 @@ export default function Layout({ children, title = 'Wastpol' }) {
Wastpol - Wastpol + {/* Wastpol */}