{"id":4672,"date":"2024-11-23T17:12:08","date_gmt":"2024-11-23T16:12:08","guid":{"rendered":"https:\/\/fahrtauglich.ch\/?page_id=4672"},"modified":"2025-02-05T22:56:37","modified_gmt":"2025-02-05T21:56:37","slug":"uhrentest","status":"publish","type":"page","link":"https:\/\/fahrtauglich.ch\/fr\/praxisportal\/uhrentest\/","title":{"rendered":"Test de l'horloge"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"4672\" class=\"elementor elementor-4672\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-279daf0 e-flex e-con-boxed e-con e-parent\" data-id=\"279daf0\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-2f5d06c elementor-widget elementor-widget-heading\" data-id=\"2f5d06c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h1 class=\"elementor-heading-title elementor-size-default\">Uhrentest<\/h1>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1f2f64f elementor-widget elementor-widget-html\" data-id=\"1f2f64f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<!DOCTYPE html>\r\n<html lang=\"de\">\r\n<head>\r\n    <meta charset=\"UTF-8\">\r\n    <title>Uhrentest \u2013 Kognitive F\u00e4higkeiten Selbsttest<\/title>\r\n    <meta name=\"description\" content=\"Unser sensibler Uhrentest bewertet Ihre kognitiven F\u00e4higkeiten. Zeichnen Sie eine Uhr online und erhalten Sie pr\u00e4zise Ergebnisse.\">\r\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\r\n    <!-- Einbindung der Poppins-Schriftart von Google Fonts -->\r\n    <link rel=\"preconnect\" href=\"https:\/\/fonts.googleapis.com\">\r\n    <link rel=\"preconnect\" href=\"https:\/\/fonts.gstatic.com\" crossorigin>\r\n    <link href=\"https:\/\/fonts.googleapis.com\/css2?family=Poppins&display=swap\" rel=\"stylesheet\">\r\n    <style>\r\n        \/* CSS: Styling f\u00fcr den Uhrentest *\/\r\n        body {\r\n            font-family: 'Poppins', sans-serif;\r\n            background-color: #f4f4f4;\r\n            margin: 0;\r\n            padding: 20px;\r\n            display: block;\r\n            min-height: 100vh;\r\n        }\r\n\r\n        .clock-test-app {\r\n            max-width: 800px;\r\n            width: 100%;\r\n            margin: 0 auto;\r\n            background-color: #fff;\r\n            padding: 20px;\r\n            border-radius: 8px;\r\n            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);\r\n            text-align: center;\r\n        }\r\n\r\n        .instruction {\r\n            margin-bottom: 20px;\r\n        }\r\n\r\n        .instruction p {\r\n            font-size: 20px;\r\n            color: #333;\r\n            margin: 0;\r\n        }\r\n\r\n        .canvas-container {\r\n            display: flex;\r\n            flex-direction: column;\r\n            align-items: center;\r\n            gap: 20px;\r\n        }\r\n\r\n        canvas {\r\n            width: 100%;\r\n            max-width: 400px;\r\n            height: auto;\r\n            border: 2px solid #333;\r\n            border-radius: 50%;\r\n            touch-action: none;\r\n            background-color: #fff;\r\n        }\r\n\r\n        .control-panel {\r\n            display: flex;\r\n            justify-content: center;\r\n            gap: 10px;\r\n            flex-wrap: wrap;\r\n            margin: 20px 0;\r\n        }\r\n\r\n        .control-panel button {\r\n            padding: 10px 20px;\r\n            font-size: 16px;\r\n            cursor: pointer;\r\n            background-color: #FFBE00;\r\n            color: #000;\r\n            border: none;\r\n            border-radius: 4px;\r\n            transition: background-color 0.3s ease;\r\n            font-weight: bold;\r\n        }\r\n\r\n        .control-panel button:hover {\r\n            background-color: #e6a700;\r\n        }\r\n\r\n        .result {\r\n            margin-top: 20px;\r\n            font-size: 16px;\r\n            color: #333;\r\n        }\r\n\r\n        .solution-section {\r\n            margin-top: 30px;\r\n            display: none;\r\n            text-align: center;\r\n        }\r\n\r\n        .solution-section h3 {\r\n            margin-bottom: 10px;\r\n            text-align: center; \/* Zentriert den Titel *\/\r\n        }\r\n\r\n        .evaluation {\r\n            text-align: center; \/* Zentriert den gesamten Abschnitt *\/\r\n            margin-top: 20px;\r\n        }\r\n\r\n        .evaluation ul {\r\n            list-style: none; \/* Entfernt die Nummerierung *\/\r\n            padding: 0;\r\n            display: inline-block; \/* Erm\u00f6glicht das Zentrieren *\/\r\n            text-align: left; \/* Richtet den Text innerhalb der Liste links aus *\/\r\n        }\r\n\r\n        .evaluation li {\r\n            margin-bottom: 10px;\r\n            font-size: 16px;\r\n            display: flex;\r\n            align-items: center;\r\n            justify-content: flex-start; \/* Linksb\u00fcndige Ausrichtung *\/\r\n        }\r\n\r\n        .evaluation input[type=\"checkbox\"] {\r\n            margin-right: 10px;\r\n        }\r\n\r\n        \/* Stil f\u00fcr das Gl\u00fcckwunsch-Popup *\/\r\n        #overlay {\r\n            display: none;\r\n            position: fixed;\r\n            top: 0;\r\n            left: 0;\r\n            width: 100%;\r\n            height: 100%;\r\n            background-color: rgba(0,0,0,0.5);\r\n            z-index: 999;\r\n        }\r\n\r\n        #congrats-message {\r\n            display: none;\r\n            position: fixed;\r\n            top: 50%;\r\n            left: 50%;\r\n            transform: translate(-50%, -50%);\r\n            background-color: #fff;\r\n            padding: 30px;\r\n            border-radius: 10px;\r\n            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);\r\n            text-align: center;\r\n            z-index: 1000;\r\n        }\r\n\r\n        #congrats-message.active {\r\n            display: block;\r\n        }\r\n\r\n        #congrats-message h2 {\r\n            margin-bottom: 15px;\r\n        }\r\n\r\n        #congrats-message p {\r\n            margin-bottom: 20px;\r\n            font-size: 18px;\r\n        }\r\n\r\n        #congrats-message button {\r\n            padding: 10px 20px;\r\n            font-size: 16px;\r\n            cursor: pointer;\r\n            background-color: #FFBE00;\r\n            color: #000;\r\n            border: none;\r\n            border-radius: 4px;\r\n            transition: background-color 0.3s ease;\r\n            font-weight: bold;\r\n        }\r\n\r\n        #congrats-message button:hover {\r\n            background-color: #e6a700;\r\n        }\r\n    <\/style>\r\n<\/head>\r\n<body>\r\n    <!-- Uhrentest Anwendung -->\r\n    <div class=\"clock-test-app\">\r\n        <div class=\"instruction\">\r\n            <p id=\"instructionText\">Bitte zeichnen Sie im oberen Ziffernblatt eine analoge Uhr, die angezeigt wird. Klicken Sie auf den Knopf \"L\u00f6sung anzeigen\", um die korrekte Uhrzeit im unteren Ziffernblatt zu sehen.<\/p>\r\n        <\/div>\r\n        <div class=\"canvas-container\">\r\n            <!-- Benutzer-Canvas zum Zeichnen der Uhr -->\r\n            <canvas id=\"userClockCanvas\" width=\"400\" height=\"400\"><\/canvas>\r\n            <!-- L\u00f6sungs-Canvas zur Anzeige der korrekten Uhr -->\r\n            <canvas id=\"solutionClockCanvas\" width=\"400\" height=\"400\"><\/canvas>\r\n        <\/div>\r\n        <div class=\"control-panel\">\r\n            <button id=\"clearBtn\">L\u00f6schen<\/button>\r\n            <button id=\"showSolutionBtn\">L\u00f6sung anzeigen<\/button>\r\n            <button id=\"nextLevelBtn\">N\u00e4chste Zeit<\/button>\r\n        <\/div>\r\n        <div id=\"result\" class=\"result\"><\/div>\r\n        <div id=\"solutionSection\" class=\"solution-section\">\r\n            <h3>Selbstevaluation:<\/h3> <!-- Ge\u00e4nderte \u00dcberschrift -->\r\n            <!-- Die L\u00f6sung wird im L\u00f6sungs-Canvas angezeigt -->\r\n            <div class=\"evaluation\">\r\n                <ul>\r\n                    <li><input type=\"checkbox\" id=\"q1\"> Sind 12 Zahlen vorhanden?<\/li>\r\n                    <li><input type=\"checkbox\" id=\"q2\"> Ist die Zahl \u201e12\u201c oben?<\/li>\r\n                    <li><input type=\"checkbox\" id=\"q3\"> Sind zwei unterscheidbare Zeiger vorhanden?<\/li>\r\n                    <li><input type=\"checkbox\" id=\"q4\"> Stimmt die gezeichnete Zeit mit der Zeit in der Instruktion?<\/li>\r\n                <\/ul>\r\n            <\/div>\r\n        <\/div>\r\n    <\/div>\r\n\r\n    <!-- Overlay und Gl\u00fcckwunsch-Popup -->\r\n    <div id=\"overlay\"><\/div>\r\n    <div id=\"congrats-message\">\r\n        <h2>Herzlichen Gl\u00fcckwunsch!<\/h2>\r\n        <p>Sie haben die Aufgabe erfolgreich gel\u00f6st.<\/p>\r\n        <button id=\"close-congrats-btn\">OK<\/button>\r\n    <\/div>\r\n\r\n    <script>\r\n        \/\/ JavaScript: Funktionalit\u00e4t f\u00fcr den Uhrentest\r\n        document.addEventListener('DOMContentLoaded', function () {\r\n            const userCanvas = document.getElementById('userClockCanvas');\r\n            const userCtx = userCanvas.getContext('2d');\r\n            const solutionCanvas = document.getElementById('solutionClockCanvas');\r\n            const solutionCtx = solutionCanvas.getContext('2d');\r\n            const clearBtn = document.getElementById('clearBtn');\r\n            const showSolutionBtn = document.getElementById('showSolutionBtn');\r\n            const nextLevelBtn = document.getElementById('nextLevelBtn');\r\n            const instructionText = document.getElementById('instructionText');\r\n            const resultDiv = document.getElementById('result');\r\n            const solutionSection = document.getElementById('solutionSection');\r\n            const overlay = document.getElementById('overlay');\r\n            const congratsMessage = document.getElementById('congrats-message');\r\n            const closeCongratsBtn = document.getElementById('close-congrats-btn');\r\n\r\n            let currentTime = null;\r\n\r\n            \/\/ Liste m\u00f6glicher Zeiten f\u00fcr den Test\r\n            const timeOptions = [\r\n                { hours: 1, minutes: 15 },\r\n                { hours: 2, minutes: 30 },\r\n                { hours: 3, minutes: 45 },\r\n                { hours: 4, minutes: 0 },\r\n                { hours: 5, minutes: 30 },\r\n                { hours: 6, minutes: 45 },\r\n                { hours: 7, minutes: 15 },\r\n                { hours: 8, minutes: 0 },\r\n                { hours: 9, minutes: 30 },\r\n                { hours: 10, minutes: 15 },\r\n                { hours: 11, minutes: 45 },\r\n                { hours: 12, minutes: 0 }\r\n            ];\r\n\r\n            \/\/ Variablen zur Verfolgung der vorherigen Canvas-Gr\u00f6\u00dfe\r\n            let previousUserCanvasWidth = userCanvas.width;\r\n            let previousUserCanvasHeight = userCanvas.height;\r\n            let previousSolutionCanvasWidth = solutionCanvas.width;\r\n            let previousSolutionCanvasHeight = solutionCanvas.height;\r\n\r\n            \/\/ Initialisierung der Canvases\r\n            function setupCanvas(canvas, ctx) {\r\n                const ratio = window.devicePixelRatio || 1;\r\n                \/\/ Transformation zur\u00fccksetzen\r\n                ctx.setTransform(1, 0, 0, 1, 0, 0);\r\n                \/\/ Gr\u00f6\u00dfe des Canvas anpassen, um quadratisch zu bleiben\r\n                canvas.width = canvas.offsetWidth * ratio;\r\n                canvas.height = canvas.offsetWidth * ratio;\r\n                ctx.scale(ratio, ratio);\r\n                ctx.lineWidth = 2;\r\n                ctx.lineCap = 'round';\r\n                ctx.strokeStyle = '#000'; \/\/ Standardfarbe f\u00fcr das Ziffernblatt\r\n                clearCanvas(ctx);\r\n            }\r\n\r\n            \/\/ Canvas l\u00f6schen\r\n            function clearCanvas(ctx) {\r\n                ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height);\r\n            }\r\n\r\n            \/\/ Ein einzelner Kreis als Ziffernblatt zeichnen\r\n            function drawCircle(ctx) {\r\n                ctx.strokeStyle = '#000'; \/\/ **Festlegen der Linienfarbe auf Schwarz**\r\n                ctx.beginPath();\r\n                const width = ctx.canvas.width \/ (window.devicePixelRatio || 1);\r\n                const radius = (width \/ 2) - 20; \/\/ Sicherstellen, dass der Kreis nicht oval wird\r\n                const centerX = width \/ 2;\r\n                const centerY = width \/ 2;\r\n                ctx.arc(centerX, centerY, radius, 0, Math.PI * 2);\r\n                ctx.stroke();\r\n                ctx.closePath();\r\n            }\r\n\r\n            \/\/ Zuf\u00e4llige Uhrzeit ausw\u00e4hlen\r\n            function getRandomTime() {\r\n                const randomIndex = Math.floor(Math.random() * timeOptions.length);\r\n                return timeOptions[randomIndex];\r\n            }\r\n\r\n            \/\/ Uhrzeit formatieren\r\n            function formatTime(time) {\r\n                const hours = time.hours;\r\n                const minutes = time.minutes < 10 ? '0' + time.minutes : time.minutes;\r\n                return `${hours}:${minutes}`;\r\n            }\r\n\r\n            \/\/ Anweisung aktualisieren\r\n            function updateInstruction() {\r\n                if (currentTime) {\r\n                    instructionText.textContent = `Bitte zeichnen Sie im oberen Ziffernblatt eine analoge Uhr, die die Uhrzeit ${formatTime(currentTime)} anzeigt. Klicken Sie auf den Knopf \"L\u00f6sung anzeigen\", um die korrekte Uhrzeit im unteren Ziffernblatt zu sehen.`;\r\n                } else {\r\n                    instructionText.textContent = \"Bitte zeichnen Sie im oberen Ziffernblatt eine analoge Uhr, die angezeigt wird. Klicken Sie auf den Knopf \\\"L\u00f6sung anzeigen\\\", um die korrekte Uhrzeit im unteren Ziffernblatt zu sehen.\";\r\n                }\r\n            }\r\n\r\n            \/\/ L\u00f6sung zeichnen\r\n            function drawSolution() {\r\n                solutionSection.style.display = 'block';\r\n                clearCanvas(solutionCtx);\r\n                drawCircle(solutionCtx); \/\/ Kreis zeichnen\r\n                drawNumbers(solutionCtx); \/\/ Zahlen hinzuf\u00fcgen\r\n                drawClockHands(solutionCtx, currentTime); \/\/ Zeiger hinzuf\u00fcgen\r\n                resultDiv.innerText = 'L\u00f6sung wurde angezeigt.';\r\n            }\r\n\r\n            \/\/ Zahlen zeichnen\r\n            function drawNumbers(ctx) {\r\n                ctx.font = `20px 'Poppins', sans-serif`;\r\n                ctx.textAlign = 'center';\r\n                ctx.textBaseline = 'middle';\r\n                const width = ctx.canvas.width \/ (window.devicePixelRatio || 1);\r\n                const radius = (width \/ 2) - 20;\r\n                const centerX = width \/ 2;\r\n                const centerY = width \/ 2;\r\n                for (let num = 1; num <= 12; num++) {\r\n                    const angle = (num - 3) * (Math.PI * 2) \/ 12;\r\n                    const x = centerX + Math.cos(angle) * (radius - 30);\r\n                    const y = centerY + Math.sin(angle) * (radius - 30);\r\n                    ctx.fillStyle = \"#000\";\r\n                    ctx.fillText(num.toString(), x, y);\r\n                }\r\n            }\r\n\r\n            \/\/ Zeiger zeichnen\r\n            function drawClockHands(ctx, time) {\r\n                const width = ctx.canvas.width \/ (window.devicePixelRatio || 1);\r\n                const radius = (width \/ 2) - 20;\r\n                const centerX = width \/ 2;\r\n                const centerY = width \/ 2;\r\n\r\n                const hours = time.hours % 12;\r\n                const minutes = time.minutes;\r\n\r\n                const hourAngle = (Math.PI \/ 6) * (hours + minutes \/ 60) - Math.PI \/ 2;\r\n                const minuteAngle = (Math.PI \/ 30) * minutes - Math.PI \/ 2;\r\n\r\n                \/\/ Stundenzeiger\r\n                ctx.beginPath();\r\n                ctx.moveTo(centerX, centerY);\r\n                ctx.lineTo(\r\n                    centerX + Math.cos(hourAngle) * (radius * 0.5),\r\n                    centerY + Math.sin(hourAngle) * (radius * 0.5)\r\n                );\r\n                ctx.strokeStyle = '#000'; \/\/ Stundenzeiger immer schwarz\r\n                ctx.lineWidth = 4;\r\n                ctx.stroke();\r\n                ctx.closePath();\r\n\r\n                \/\/ Minutenzeiger\r\n                ctx.beginPath();\r\n                ctx.moveTo(centerX, centerY);\r\n                ctx.lineTo(\r\n                    centerX + Math.cos(minuteAngle) * (radius * 0.8),\r\n                    centerY + Math.sin(minuteAngle) * (radius * 0.8)\r\n                );\r\n                ctx.strokeStyle = '#000'; \/\/ Minutenzeiger immer schwarz\r\n                ctx.lineWidth = 2;\r\n                ctx.stroke();\r\n                ctx.closePath();\r\n            }\r\n\r\n            \/\/ ===== Zeichenfunktionen f\u00fcr das Benutzer-Canvas =====\r\n\r\n            \/\/ Initialisierung der Zeichen-Variablen\r\n            const square = userCanvas; \/\/ 'userClockCanvas' entspricht 'drawPlace'\r\n            const paper = userCtx;\r\n            let pressedMouse = false; \r\n            let x;\r\n            let y;\r\n            const colorLine = \"#9ACD32\";\r\n            const key = {C: 67};\r\n\r\n            \/\/ Event Listener f\u00fcr Zeichnen mit Maus\r\n            square.addEventListener(\"mousedown\", startDrawing);\r\n            square.addEventListener(\"mousemove\", drawLine);\r\n            square.addEventListener(\"mouseup\", stopDrawing);\r\n            square.addEventListener(\"mouseout\", stopDrawing); \/\/ Beendet das Zeichnen, wenn die Maus den Canvas verl\u00e4sst\r\n\r\n            \/\/ Event Listener f\u00fcr Zeichnen mit Touch (Mobile)\r\n            square.addEventListener('touchstart', handleTouchStart, { passive: false });\r\n            square.addEventListener('touchmove', handleTouchMove, { passive: false });\r\n            square.addEventListener('touchend', stopDrawing);\r\n            square.addEventListener('touchcancel', stopDrawing);\r\n\r\n            \/\/ Keydown Event Listener f\u00fcr L\u00f6schen mit 'C'\r\n            document.addEventListener(\"keydown\", clearCanvasHandler);\r\n\r\n            function startDrawing(event) {\r\n                pressedMouse = true;\r\n                const rect = square.getBoundingClientRect();\r\n                x = event.clientX - rect.left;\r\n                y = event.clientY - rect.top;\r\n            }\r\n\r\n            function drawLine(event) {\r\n                if (pressedMouse) {\r\n                    square.style.cursor = \"crosshair\";\r\n                    const rect = square.getBoundingClientRect();\r\n                    const xM = event.clientX - rect.left;\r\n                    const yM = event.clientY - rect.top;\r\n                    drawing_line(colorLine, x, y, xM, yM, paper);\r\n                    x = xM;\r\n                    y = yM;\r\n                }\r\n            }\r\n\r\n            function stopDrawing(event) {\r\n                if (pressedMouse) {\r\n                    pressedMouse = false;\r\n                    square.style.cursor = \"default\";\r\n                }\r\n            }\r\n\r\n            function clearCanvasHandler(event) {\r\n                if (event.keyCode == key.C) {\r\n                    paper.clearRect(0, 0, square.width, square.height);\r\n                    drawCircle(userCtx); \/\/ Zeichne das Ziffernblatt neu\r\n                }\r\n            }\r\n\r\n            \/\/ Touch Event Handlers\r\n            function handleTouchStart(e) {\r\n                if (e.touches.length === 1) {\r\n                    const touch = e.touches[0];\r\n                    const rect = square.getBoundingClientRect();\r\n                    x = touch.clientX - rect.left;\r\n                    y = touch.clientY - rect.top;\r\n                    pressedMouse = true;\r\n                    e.preventDefault(); \/\/ Nur verhindern, wenn Zeichnen gestartet wird\r\n                }\r\n            }\r\n\r\n            function handleTouchMove(e) {\r\n                if (pressedMouse && e.touches.length === 1) {\r\n                    const touch = e.touches[0];\r\n                    const rect = square.getBoundingClientRect();\r\n                    const xM = touch.clientX - rect.left;\r\n                    const yM = touch.clientY - rect.top;\r\n                    drawing_line(colorLine, x, y, xM, yM, paper);\r\n                    x = xM;\r\n                    y = yM;\r\n                    e.preventDefault(); \/\/ Nur verhindern, wenn Zeichnen erfolgt\r\n                }\r\n            }\r\n\r\n            function drawing_line(color, x_start, y_start, x_end, y_end, board){\r\n                board.beginPath();\r\n                board.strokeStyle = color; \/\/ Setzt die Linienfarbe f\u00fcr die Benutzerzeichnung\r\n                board.lineWidth = 2;\r\n                board.moveTo(x_start, y_start);\r\n                board.lineTo(x_end, y_end);\r\n                board.stroke(); \r\n                board.closePath();\r\n            }\r\n\r\n            \/\/ ===== Button Funktionen =====\r\n\r\n            \/\/ Event Listener f\u00fcr das \"L\u00f6schen\"-Button\r\n            clearBtn.addEventListener('click', () => {\r\n                paper.clearRect(0, 0, square.width, square.height);\r\n                drawCircle(userCtx); \/\/ Zeichne das Ziffernblatt neu\r\n                clearCanvas(solutionCtx);\r\n                drawCircle(solutionCtx); \/\/ Zeichne das Ziffernblatt auf der L\u00f6sung\r\n                solutionSection.style.display = 'none';\r\n                resultDiv.innerText = '';\r\n            });\r\n\r\n            \/\/ Event Listener f\u00fcr das \"L\u00f6sung anzeigen\"-Button\r\n            showSolutionBtn.addEventListener('click', () => {\r\n                if (!currentTime) return;\r\n                drawSolution();\r\n            });\r\n\r\n            \/\/ Event Listener f\u00fcr das \"N\u00e4chste Zeit\"-Button\r\n            nextLevelBtn.addEventListener('click', () => {\r\n                currentTime = getRandomTime();\r\n                updateInstruction();\r\n                paper.clearRect(0, 0, square.width, square.height);\r\n                drawCircle(userCtx); \/\/ Zeichne das Ziffernblatt neu\r\n                clearCanvas(solutionCtx);\r\n                drawCircle(solutionCtx); \/\/ Zeichne das Ziffernblatt auf der L\u00f6sung\r\n                solutionSection.style.display = 'none';\r\n                resultDiv.innerText = '';\r\n            });\r\n\r\n            \/\/ Event Listener f\u00fcr das \"OK\"-Button im Gl\u00fcckwunsch-Popup\r\n            closeCongratsBtn.addEventListener('click', () => {\r\n                congratsMessage.classList.remove('active');\r\n                overlay.style.display = 'none';\r\n                \/\/ Optional: Start eine neue Aufgabe oder mache etwas anderes\r\n            });\r\n\r\n            \/\/ ===== Initialisierung =====\r\n            function initialize() {\r\n                setupCanvas(userCanvas, userCtx);\r\n                setupCanvas(solutionCanvas, solutionCtx);\r\n                drawCircle(userCtx); \/\/ Zeichne das Ziffernblatt neu\r\n                drawCircle(solutionCtx); \/\/ Zeichne das Ziffernblatt auf der L\u00f6sung\r\n                currentTime = getRandomTime(); \/\/ Uhrzeit beim Laden ausw\u00e4hlen\r\n                updateInstruction();\r\n            }\r\n\r\n            initialize();\r\n\r\n            \/\/ Responsivit\u00e4t mit \u00dcberpr\u00fcfung der Canvas-Gr\u00f6\u00dfe\r\n            window.addEventListener('resize', () => {\r\n                const newUserWidth = userCanvas.offsetWidth * (window.devicePixelRatio || 1);\r\n                const newUserHeight = userCanvas.offsetWidth * (window.devicePixelRatio || 1);\r\n                const newSolutionWidth = solutionCanvas.offsetWidth * (window.devicePixelRatio || 1);\r\n                const newSolutionHeight = solutionCanvas.offsetWidth * (window.devicePixelRatio || 1);\r\n\r\n                let shouldResizeUserCanvas = (newUserWidth !== previousUserCanvasWidth) || (newUserHeight !== previousUserCanvasHeight);\r\n                let shouldResizeSolutionCanvas = (newSolutionWidth !== previousSolutionCanvasWidth) || (newSolutionHeight !== previousSolutionCanvasHeight);\r\n\r\n                if (shouldResizeUserCanvas) {\r\n                    setupCanvas(userCanvas, userCtx); \/\/ Zeichne das Ziffernblatt neu\r\n                    drawCircle(userCtx);\r\n                    previousUserCanvasWidth = newUserWidth;\r\n                    previousUserCanvasHeight = newUserHeight;\r\n                }\r\n\r\n                if (shouldResizeSolutionCanvas) {\r\n                    setupCanvas(solutionCanvas, solutionCtx); \/\/ Zeichne das Ziffernblatt auf der L\u00f6sung neu\r\n                    if (solutionSection.style.display === 'block') {\r\n                        drawCircle(solutionCtx);\r\n                        drawNumbers(solutionCtx);\r\n                        drawClockHands(solutionCtx, currentTime);\r\n                    } else {\r\n                        drawCircle(solutionCtx); \/\/ Zeichne das Ziffernblatt auf der L\u00f6sung\r\n                    }\r\n                    previousSolutionCanvasWidth = newSolutionWidth;\r\n                    previousSolutionCanvasHeight = newSolutionHeight;\r\n                }\r\n            });\r\n\r\n            \/\/ Optional: Zeige das Gl\u00fcckwunsch-Popup nach dem Zeichnen (hier als Beispiel nach dem Zeichnen)\r\n            \/\/ Du kannst eine Bedingung hinzuf\u00fcgen, um zu bestimmen, wann das Popup angezeigt werden soll\r\n            \/\/ Zum Beispiel nach dem Anzeigen der L\u00f6sung\r\n            showSolutionBtn.addEventListener('click', () => {\r\n                drawSolution();\r\n                \/\/ Optional: Bedingung hinzuf\u00fcgen, um zu pr\u00fcfen, ob die Zeichnung korrekt ist\r\n                \/\/ Zeige das Popup, wenn die Zeichnung abgeschlossen ist\r\n                \/\/ congratsMessage.classList.add('active');\r\n                \/\/ overlay.style.display = 'block';\r\n            });\r\n        });\r\n    <\/script>\r\n<\/body>\r\n<\/html>\r\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-ec2061f e-flex e-con-boxed e-con e-parent\" data-id=\"ec2061f\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-bc17f55 elementor-widget elementor-widget-heading\" data-id=\"bc17f55\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Erkl\u00e4rung der Kn\u00f6pfe<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3a1884a elementor-widget elementor-widget-text-editor\" data-id=\"3a1884a\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<ul><li><p><strong>L\u00f6schen:<\/strong> Mit diesem Knopf k\u00f6nnen Sie alle Zeichnungen auf dem oberen Ziffernblatt entfernen und das Ziffernblatt auf den Ausgangszustand zur\u00fccksetzen. Perfekt, wenn Sie eine neue Uhr zeichnen m\u00f6chten!<\/p><\/li><li><p><strong>L\u00f6sung anzeigen:<\/strong> Lassen Sie sich die korrekte Uhrzeit auf dem unteren Ziffernblatt anzeigen. Ideal, um Ihre Zeichnung mit der richtigen L\u00f6sung zu vergleichen und Ihre F\u00e4higkeiten zu \u00fcberpr\u00fcfen!<\/p><\/li><li><p><strong>N\u00e4chste Zeit:<\/strong> Generieren Sie eine neue zuf\u00e4llige Uhrzeit f\u00fcr Ihre n\u00e4chste Zeichnungsaufgabe. F\u00fcr endlosen \u00dcbungsspa\u00df und stetige Herausforderungen!<\/p><\/li><\/ul>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Der Uhrentest: Zeichnen Sie eine Uhr und testen Sie Ihre kognitiven F\u00e4higkeiten!<\/p>","protected":false},"author":1,"featured_media":4674,"parent":1467,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"content-type":"","iawp_total_views":4526,"footnotes":""},"class_list":["post-4672","page","type-page","status-publish","has-post-thumbnail","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Uhrentest: Sind Sie geistig noch fit? L\u00f6sen Sie den Uhrentest<\/title>\n<meta name=\"description\" content=\"Uhrentest Demenz: Ein bew\u00e4hrtes Verfahren zur Fr\u00fcherkennung von Demenz und kognitiven Beeintr\u00e4chtigungen \u2013 einfach, schnell und zuverl\u00e4ssig.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/fahrtauglich.ch\/fr\/praxisportal\/uhrentest\/\" \/>\n<meta property=\"og:locale\" content=\"fr_FR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Uhrentest: Sind Sie geistig noch fit? L\u00f6sen Sie den Uhrentest\" \/>\n<meta property=\"og:description\" content=\"Uhrentest Demenz: Ein bew\u00e4hrtes Verfahren zur Fr\u00fcherkennung von Demenz und kognitiven Beeintr\u00e4chtigungen \u2013 einfach, schnell und zuverl\u00e4ssig.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fahrtauglich.ch\/fr\/praxisportal\/uhrentest\/\" \/>\n<meta property=\"og:site_name\" content=\"Fahrtauglich\" \/>\n<meta property=\"article:modified_time\" content=\"2025-02-05T21:56:37+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/fahrtauglich.ch\/wp-content\/uploads\/2024\/11\/Uhrentest.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"2560\" \/>\n\t<meta property=\"og:image:height\" content=\"1440\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Dur\u00e9e de lecture estim\u00e9e\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/fahrtauglich.ch\\\/praxisportal\\\/uhrentest\\\/\",\"url\":\"https:\\\/\\\/fahrtauglich.ch\\\/praxisportal\\\/uhrentest\\\/\",\"name\":\"Uhrentest: Sind Sie geistig noch fit? L\u00f6sen Sie den Uhrentest\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/fahrtauglich.ch\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/fahrtauglich.ch\\\/praxisportal\\\/uhrentest\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/fahrtauglich.ch\\\/praxisportal\\\/uhrentest\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/fahrtauglich.ch\\\/wp-content\\\/uploads\\\/2024\\\/11\\\/Uhrentest.jpg\",\"datePublished\":\"2024-11-23T16:12:08+00:00\",\"dateModified\":\"2025-02-05T21:56:37+00:00\",\"description\":\"Uhrentest Demenz: Ein bew\u00e4hrtes Verfahren zur Fr\u00fcherkennung von Demenz und kognitiven Beeintr\u00e4chtigungen \u2013 einfach, schnell und zuverl\u00e4ssig.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/fahrtauglich.ch\\\/praxisportal\\\/uhrentest\\\/#breadcrumb\"},\"inLanguage\":\"fr-FR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/fahrtauglich.ch\\\/praxisportal\\\/uhrentest\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\\\/\\\/fahrtauglich.ch\\\/praxisportal\\\/uhrentest\\\/#primaryimage\",\"url\":\"https:\\\/\\\/fahrtauglich.ch\\\/wp-content\\\/uploads\\\/2024\\\/11\\\/Uhrentest.jpg\",\"contentUrl\":\"https:\\\/\\\/fahrtauglich.ch\\\/wp-content\\\/uploads\\\/2024\\\/11\\\/Uhrentest.jpg\",\"width\":2560,\"height\":1440,\"caption\":\"Uhrentest - Clock Drawing Test\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/fahrtauglich.ch\\\/praxisportal\\\/uhrentest\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Startseite\",\"item\":\"https:\\\/\\\/fahrtauglich.ch\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Praxisportal\",\"item\":\"https:\\\/\\\/fahrtauglich.ch\\\/praxisportal\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Uhrentest\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/fahrtauglich.ch\\\/#website\",\"url\":\"https:\\\/\\\/fahrtauglich.ch\\\/\",\"name\":\"Fahrtauglich\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/fahrtauglich.ch\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/fahrtauglich.ch\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"fr-FR\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/fahrtauglich.ch\\\/#organization\",\"name\":\"Fahrtauglich\",\"url\":\"https:\\\/\\\/fahrtauglich.ch\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"fr-FR\",\"@id\":\"https:\\\/\\\/fahrtauglich.ch\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/fahrtauglich.ch\\\/wp-content\\\/uploads\\\/2024\\\/08\\\/cropped-Logo-2.jpg\",\"contentUrl\":\"https:\\\/\\\/fahrtauglich.ch\\\/wp-content\\\/uploads\\\/2024\\\/08\\\/cropped-Logo-2.jpg\",\"width\":307,\"height\":188,\"caption\":\"Fahrtauglich\"},\"image\":{\"@id\":\"https:\\\/\\\/fahrtauglich.ch\\\/#\\\/schema\\\/logo\\\/image\\\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Uhrentest: Sind Sie geistig noch fit? L\u00f6sen Sie den Uhrentest","description":"Uhrentest Demenz: Ein bew\u00e4hrtes Verfahren zur Fr\u00fcherkennung von Demenz und kognitiven Beeintr\u00e4chtigungen \u2013 einfach, schnell und zuverl\u00e4ssig.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/fahrtauglich.ch\/fr\/praxisportal\/uhrentest\/","og_locale":"fr_FR","og_type":"article","og_title":"Uhrentest: Sind Sie geistig noch fit? L\u00f6sen Sie den Uhrentest","og_description":"Uhrentest Demenz: Ein bew\u00e4hrtes Verfahren zur Fr\u00fcherkennung von Demenz und kognitiven Beeintr\u00e4chtigungen \u2013 einfach, schnell und zuverl\u00e4ssig.","og_url":"https:\/\/fahrtauglich.ch\/fr\/praxisportal\/uhrentest\/","og_site_name":"Fahrtauglich","article_modified_time":"2025-02-05T21:56:37+00:00","og_image":[{"width":2560,"height":1440,"url":"https:\/\/fahrtauglich.ch\/wp-content\/uploads\/2024\/11\/Uhrentest.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_misc":{"Dur\u00e9e de lecture estim\u00e9e":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/fahrtauglich.ch\/praxisportal\/uhrentest\/","url":"https:\/\/fahrtauglich.ch\/praxisportal\/uhrentest\/","name":"Uhrentest: Sind Sie geistig noch fit? L\u00f6sen Sie den Uhrentest","isPartOf":{"@id":"https:\/\/fahrtauglich.ch\/#website"},"primaryImageOfPage":{"@id":"https:\/\/fahrtauglich.ch\/praxisportal\/uhrentest\/#primaryimage"},"image":{"@id":"https:\/\/fahrtauglich.ch\/praxisportal\/uhrentest\/#primaryimage"},"thumbnailUrl":"https:\/\/fahrtauglich.ch\/wp-content\/uploads\/2024\/11\/Uhrentest.jpg","datePublished":"2024-11-23T16:12:08+00:00","dateModified":"2025-02-05T21:56:37+00:00","description":"Uhrentest Demenz: Ein bew\u00e4hrtes Verfahren zur Fr\u00fcherkennung von Demenz und kognitiven Beeintr\u00e4chtigungen \u2013 einfach, schnell und zuverl\u00e4ssig.","breadcrumb":{"@id":"https:\/\/fahrtauglich.ch\/praxisportal\/uhrentest\/#breadcrumb"},"inLanguage":"fr-FR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fahrtauglich.ch\/praxisportal\/uhrentest\/"]}]},{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/fahrtauglich.ch\/praxisportal\/uhrentest\/#primaryimage","url":"https:\/\/fahrtauglich.ch\/wp-content\/uploads\/2024\/11\/Uhrentest.jpg","contentUrl":"https:\/\/fahrtauglich.ch\/wp-content\/uploads\/2024\/11\/Uhrentest.jpg","width":2560,"height":1440,"caption":"Uhrentest - Clock Drawing Test"},{"@type":"BreadcrumbList","@id":"https:\/\/fahrtauglich.ch\/praxisportal\/uhrentest\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Startseite","item":"https:\/\/fahrtauglich.ch\/"},{"@type":"ListItem","position":2,"name":"Praxisportal","item":"https:\/\/fahrtauglich.ch\/praxisportal\/"},{"@type":"ListItem","position":3,"name":"Uhrentest"}]},{"@type":"WebSite","@id":"https:\/\/fahrtauglich.ch\/#website","url":"https:\/\/fahrtauglich.ch\/","name":"Fahrtauglich","description":"","publisher":{"@id":"https:\/\/fahrtauglich.ch\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fahrtauglich.ch\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"fr-FR"},{"@type":"Organization","@id":"https:\/\/fahrtauglich.ch\/#organization","name":"Fahrtauglich","url":"https:\/\/fahrtauglich.ch\/","logo":{"@type":"ImageObject","inLanguage":"fr-FR","@id":"https:\/\/fahrtauglich.ch\/#\/schema\/logo\/image\/","url":"https:\/\/fahrtauglich.ch\/wp-content\/uploads\/2024\/08\/cropped-Logo-2.jpg","contentUrl":"https:\/\/fahrtauglich.ch\/wp-content\/uploads\/2024\/08\/cropped-Logo-2.jpg","width":307,"height":188,"caption":"Fahrtauglich"},"image":{"@id":"https:\/\/fahrtauglich.ch\/#\/schema\/logo\/image\/"}}]}},"jetpack_sharing_enabled":true,"rttpg_featured_image_url":{"full":["https:\/\/fahrtauglich.ch\/wp-content\/uploads\/2024\/11\/Uhrentest.jpg",2560,1440,false],"landscape":["https:\/\/fahrtauglich.ch\/wp-content\/uploads\/2024\/11\/Uhrentest.jpg",2560,1440,false],"portraits":["https:\/\/fahrtauglich.ch\/wp-content\/uploads\/2024\/11\/Uhrentest.jpg",2560,1440,false],"thumbnail":["https:\/\/fahrtauglich.ch\/wp-content\/uploads\/2024\/11\/Uhrentest-150x150.jpg",150,150,true],"medium":["https:\/\/fahrtauglich.ch\/wp-content\/uploads\/2024\/11\/Uhrentest-300x169.jpg",300,169,true],"large":["https:\/\/fahrtauglich.ch\/wp-content\/uploads\/2024\/11\/Uhrentest-1024x576.jpg",800,450,true],"1536x1536":["https:\/\/fahrtauglich.ch\/wp-content\/uploads\/2024\/11\/Uhrentest-1536x864.jpg",1536,864,true],"2048x2048":["https:\/\/fahrtauglich.ch\/wp-content\/uploads\/2024\/11\/Uhrentest-2048x1152.jpg",2048,1152,true],"trp-custom-language-flag":["https:\/\/fahrtauglich.ch\/wp-content\/uploads\/2024\/11\/Uhrentest.jpg",18,10,false],"woocommerce_thumbnail":["https:\/\/fahrtauglich.ch\/wp-content\/uploads\/2024\/11\/Uhrentest-300x169.jpg",300,169,true],"woocommerce_single":["https:\/\/fahrtauglich.ch\/wp-content\/uploads\/2024\/11\/Uhrentest-600x338.jpg",600,338,true],"woocommerce_gallery_thumbnail":["https:\/\/fahrtauglich.ch\/wp-content\/uploads\/2024\/11\/Uhrentest-100x100.jpg",100,100,true]},"rttpg_author":{"display_name":"fahrtauglich.ch","author_link":"https:\/\/fahrtauglich.ch\/fr\/blog\/author\/mintcream-quetzal-259960-hostingersite-com\/"},"rttpg_comment":0,"rttpg_category":null,"rttpg_excerpt":"Der Uhrentest: Zeichnen Sie eine Uhr und testen Sie Ihre kognitiven F\u00e4higkeiten!","_links":{"self":[{"href":"https:\/\/fahrtauglich.ch\/fr\/wp-json\/wp\/v2\/pages\/4672","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fahrtauglich.ch\/fr\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/fahrtauglich.ch\/fr\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/fahrtauglich.ch\/fr\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fahrtauglich.ch\/fr\/wp-json\/wp\/v2\/comments?post=4672"}],"version-history":[{"count":75,"href":"https:\/\/fahrtauglich.ch\/fr\/wp-json\/wp\/v2\/pages\/4672\/revisions"}],"predecessor-version":[{"id":5757,"href":"https:\/\/fahrtauglich.ch\/fr\/wp-json\/wp\/v2\/pages\/4672\/revisions\/5757"}],"up":[{"embeddable":true,"href":"https:\/\/fahrtauglich.ch\/fr\/wp-json\/wp\/v2\/pages\/1467"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/fahrtauglich.ch\/fr\/wp-json\/wp\/v2\/media\/4674"}],"wp:attachment":[{"href":"https:\/\/fahrtauglich.ch\/fr\/wp-json\/wp\/v2\/media?parent=4672"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}