W3C home > Mailing lists > Public > public-dap-commits@w3.org > December 2009

2009/dap/camera Overview.html,1.31,1.32

From: Dominique Hazael-Massieux via cvs-syncmail <cvsmail@w3.org>
Date: Wed, 02 Dec 2009 14:41:00 +0000
To: public-dap-commits@w3.org
Message-Id: <E1NFqO4-000275-Sq@lionel-hutz.w3.org>
Update of /sources/public/2009/dap/camera
In directory hutz:/tmp/cvs-serv8093

Modified Files:
	Overview.html 
Log Message:
removing unneeded space in example, per http://www.w3.org/mid/8BDB1F52-D640-4CAB-9E27-C30E9D54984C@robineko.com


Index: Overview.html
===================================================================
RCS file: /sources/public/2009/dap/camera/Overview.html,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- Overview.html	2 Dec 2009 14:35:51 -0000	1.31
+++ Overview.html	2 Dec 2009 14:40:58 -0000	1.32
@@ -34,47 +34,45 @@
 </p>
 <div>
 <p>Launching a device camera application and retrieving the pictures taken. </p>
-<pre class="example sh_javascript_dom"> 
-    // Create a container div element and append it to the document body.
-    var container = document.createElement(&quot;div&quot;);
-    document.body.appendChild(container);
+<pre class="example sh_javascript_dom">// Create a container div element and append it to the document body.
+var container = document.createElement(&quot;div&quot;);
+document.body.appendChild(container);
  
-    // The browser viewport width in pixels.
-    var screenWidth = window.innerWidth;
-    
-    function successCallback(data) {
-        for (var i in data) {
-            var img = document.createElement(&quot;img&quot;);
-            img.src = data[i].uri;
-            // If the image width exceeds that of the browser viewport, the image
-            // is scaled to fit the screen keeping the aspect ratio intact.
-            if (data[i].format.width &gt; screenWidth) {
-                img.style.width = screenWidth &#43; &quot;px&quot;;
-                img.style.height = (data[i].format.height/data[i].format.width)*screenWidth &#43; &quot;px&quot;;    
-            }
-            container.appendChild(img);
-        }
-    }
+// The browser viewport width in pixels.
+var screenWidth = window.innerWidth;
+
+function successCallback(data) {
+for (var i in data) {
+var img = document.createElement(&quot;img&quot;);
+img.src = data[i].uri;
+// If the image width exceeds that of the browser viewport, the image
+// is scaled to fit the screen keeping the aspect ratio intact.
+if (data[i].format.width &gt; screenWidth) {
+img.style.width = screenWidth &#43; &quot;px&quot;;
+img.style.height = (data[i].format.height/data[i].format.width)*screenWidth &#43; &quot;px&quot;;
+}
+container.appendChild(img);
+}
+}
  
-    function errorCallback(err) {
-        alert(err.message &#43; &quot; (&quot; &#43; err.code &#43; &quot;)&quot;); 
-    }
+function errorCallback(err) {
+alert(err.message &#43; &quot; (&quot; &#43; err.code &#43; &quot;)&quot;); 
+}
  
-    // Launch the device camera application and invoke the callback once 
-    // the user exits the camera application.
-    transactionId = navigator.device.captureImage(successCallback, 1, errorCallback);
-    </pre>
+// Launch the device camera application and invoke the callback once 
+// the user exits the camera application.
+transactionId = navigator.device.captureImage(successCallback, 1, errorCallback);</pre>
 </div>
 <div>
 <p>Example of retrieving image sizes and formats supported by hosting device camera.</p>
 <pre class="example sh_javascript_dom">var summary;
-    var formats = navigator.device.supportedImageFormats;
-    
-    for (var key in formats) {
-        summary &#43;= key &#43; &quot;: &quot; &#43; formats[key] &#43; &quot;\n&quot;;
-    }
-    
-    alert(summary);</pre>
+var formats = navigator.device.supportedImageFormats;
+
+for (var key in formats) {
+summary &#43;= key &#43; &quot;: &quot; &#43; formats[key] &#43; &quot;\n&quot;;
+}
+
+alert(summary);</pre>
 </div>
 </section>
 </section>
Received on Wednesday, 2 December 2009 14:41:12 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 2 December 2009 14:41:13 GMT