diff --git a/nga-js/nga.js b/nga-js/nga.js index 787c998..569b88c 100644 --- a/nga-js/nga.js +++ b/nga-js/nga.js @@ -452,6 +452,8 @@ function evaluate(s) { function cls() { document.getElementById('console').innerHTML = ""; + const context = canvas.getContext('2d'); + context.clearRect(0, 0, canvas.width, canvas.height); } function unu(src) { @@ -497,7 +499,6 @@ function go() { function saveproject() { src = document.getElementById("input").value; - console.log('saving ' + src); localStorage.setItem("Snapshot", src); } @@ -509,7 +510,6 @@ function loadproject() { function draw(fb_start) { var canvas = document.getElementById('canvas'); var ctx = canvas.getContext('2d'); - console.log(ctx); var imgData = ctx.createImageData(300, 300); var i; for (i = 0; i < imgData.data.length / 4; i += 1) { diff --git a/nga-js/style.css b/nga-js/style.css index a970387..6ae6ea2 100644 --- a/nga-js/style.css +++ b/nga-js/style.css @@ -62,3 +62,5 @@ xmp { margin-left: 0.5em; } + canvas { + }