verträgt sich jCanvas mit visual studio code

  • Kann es sein, dass jcanvas sich nicht mit visual studio verträgt?


    In dem Beispiel wird das rRechteck gezeichnet, der Text wird aber nicht gebracht.


    Fehlermeldung

    TypeError: propCache is undefined


    !DOCTYPE html>
    <html>

    <head>

    <meta charset="utf-8"/>

    <script src="https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.3.1.min.js"></script>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/jcanvas/21.0.0/jcanvas.js">

    </script> <style type="text/css">


    body { background-color: #F3EFF9; margin: 30px; margin-top: 10px; }

    #Canvas { position: absolute; top: 0px; left: 0px; border: 5px red solid; background-color: #FFEFDB; }

    </style>

    </head>

    <body> <canvas id="Canvas" width="640" height="460"></canvas>

    <script>

    $('canvas').addLayer({ type: 'rectangle', fillStyle: 'red', x: 100, y: 100, width: 100, height: 50, fromCenter: false }) .drawLayers();

    $('canvas').drawText({ fillStyle: '#9cf', strokeStyle: '#25a', strokeWidth: 2, x: 150, y: 200, fontSize: 48, fontFamily: 'Verdana, sans-serif', text: 'Hello', fromCenter: false });

    </script>

    </body>

    </html>

    Gruß

    Jochen

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!