stack draw buton over canvas and hide it when drawing an image
authorRobert Kaiser <robert@notebook.(none)>
Fri, 3 Apr 2009 20:20:28 +0000 (22:20 +0200)
committerRobert Kaiser <robert@notebook.(none)>
Fri, 3 Apr 2009 20:20:28 +0000 (22:20 +0200)
xulapp/chrome/mandelbrot/content/mandelbrot.js
xulapp/chrome/mandelbrot/content/mandelbrot.xul

index 1b0e960..bcc2df5 100644 (file)
@@ -52,6 +52,8 @@ function drawImage() {
   let canvas = document.getElementById("mbrotImage");
   let context = canvas.getContext("2d");
 
+  document.getElementById("drawButton").hidden = true;
+
   document.getElementById("statusLabel").value =
       document.getElementById("mbrotBundle").getString("statusDrawing");
 
index 0ca532d..c6cd044 100644 (file)
       </menu>
     </menubar>
   </toolbox>
-  <button id="drawButton" label="&fileDraw.label;" oncommand="drawImage();"/>
   <hbox flex="1" pack="center" align="center">
-    <html:canvas id="mbrotImage" width="300" height="300"></html:canvas>
+    <stack>
+      <html:canvas id="mbrotImage" width="300" height="300"></html:canvas>
+      <button id="drawButton" label="&fileDraw.label;" oncommand="drawImage();"/>
+    </stack>
   </hbox>
   <hbox pack="end" align="end">
     <description id="statusLabel"/>