add Note for web service to notifiy that feature is optional
authorCho Woongsuk <ws77.cho@samsung.com>
Wed, 8 Jul 2015 05:07:13 +0000 (14:07 +0900)
committerwoongsuk cho <ws77.cho@samsung.com>
Wed, 8 Jul 2015 05:18:11 +0000 (14:18 +0900)
update example of rotarydetent event to show usage of direction value

Change-Id: I1432caa3ea9b68afd4e74feb304029fe10e6b032
Signed-off-by: Cho Woongsuk <ws77.cho@samsung.com>
org.tizen.gettingstarted/html/web/details/event_handling_w.htm
org.tizen.guides/html/web/tizen/service/service_w.htm

index 23b7bd0..6d3e54b 100644 (file)
 <pre class="prettyprint">
 document.addEventListener(&quot;rotarydetent&quot;, function(ev) 
 {
-&nbsp;&nbsp;&nbsp;var direction = ev.detail.direction; 
-&nbsp;&nbsp;&nbsp;/* Add behavior for detent detected event with a direction value */
+&nbsp;&nbsp;&nbsp;/* Get direction value from event */
+&nbsp;&nbsp;&nbsp;var direction = ev.detail.direction;
+&nbsp;&nbsp;&nbsp;
+&nbsp;&nbsp;&nbsp;if (direction == "CW")
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Add behavior for clockwise rotation */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("clockwise");
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;else if (direction == "CCW")
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Add behavior for counter-clockwise rotation */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log("counter-clockwise");
+&nbsp;&nbsp;&nbsp;}
 });
 </pre>
 
index 8a80e50..36b3926 100644 (file)
@@ -44,7 +44,7 @@
      <th class="note">Note</th> 
     </tr> 
     <tr> 
-     <td class="note">This feature is supported in wearable applications only.</td> 
+     <td class="note">This feature is supported in wearable applications only.<p>The web service application is OPTIONAL feature, which means that it may not be supported in all wearable devices.</td> 
     </tr> 
    </tbody> 
   </table>