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 1b0e960ff7d45f614f585c04cb27b9585529e5d2..bcc2df59110d7ea7adb4751ac8acc225a57c9041 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 0ca532df4ff2f53648e0d2109c28a334882421d6..c6cd044c16d5005d7d90bf794be7575059633db5 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"/>