Commit 872aa8ae authored by Tobi's avatar Tobi

Adding an simple clear field to schmier

parent b30c3e0d
......@@ -18,6 +18,7 @@
function initialize() {
initMessage();
initCanvas();
initClear();
}
function initMessage() { $('#message').text(messages[0]); }
......@@ -44,12 +45,22 @@
jQcanvas.bind('click touchstart', setRandomSettings);
}
function initClear(){
function clear(){
alert('clear');
$('#simple_sketch').removeData();
initCanvas();
}
$('#reset').bind('click touchstart', clear);
}
// jQuery ruft initialize() auf, sobald das HTML-Dokument im Browser vollstndig geladen wurde
$(function () { initialize(); });
</script>
</head>
<body>
<canvas id="simple_sketch" style="background-color: khaki; height: 100%; left: 0; position: absolute; top: 0; width: 100%;"></canvas>
<div id="reset" style="background-color:rgba(255,255,255,0.8);; left:5; position: absolute; padding:3px; top:5; height:24px width:auto">Clear Screen</div>
<div class="footer" style="background-color: gray; bottom: 0; height: 50px; left: 0; padding-top: 8px; position: absolute; right: 0;">
<div id="message" style="color: white; font-family: Helvetica, Arial, sans-serif; font-size: 18px; position: relative; text-align: center;" />
</div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment