[ImageRotation] add eventHandler for tizen hardware backKey
authorJoonghun Park <jh718.park@samsung.com>
Thu, 13 Jun 2013 02:29:48 +0000 (11:29 +0900)
committerJoonghun Park <jh718.park@samsung.com>
Tue, 18 Jun 2013 14:58:15 +0000 (23:58 +0900)
Change-Id: I144c0f36bb832b349789c59206b34f75899b1936

js/main.js

index ef545a0..c805245 100755 (executable)
@@ -20,4 +20,11 @@ function deviceOrientationEvents() {
         }
 }
 
-window.onload = function() {deviceOrientationEvents();};
+window.onload = function() {
+    //add eventListener for tizenhwkey
+    document.addEventListener('tizenhwkey', function(e){
+        tizen.application.getCurrentApplication().exit();
+    });
+
+    deviceOrientationEvents();
+};