]> gitweb @ CieloNegro.org - Rakka.git/blobdiff - js/screen.js
implemented global lock
[Rakka.git] / js / screen.js
index c30d0abeab9e869814483b71036e24f8324d6462..95ee043d486123c4a8c1e55630a668ef25cf64b2 100644 (file)
     };
 
     Rakka.restoreScreen = function () {
-        if (switchedArea == null) {
-            throw new Error("Rakka.restoreScreen(): not switched");
-        }
-
-        $("div.sideBar div.outline").show();
+        if (switchedArea != null) {
+            $("div.sideBar div.outline").show();
 
-        $("p.redirection").show();
+            $("p.redirection").show();
 
-        $(switchedArea).remove();
-        switchedArea = null;
+            $(switchedArea).remove();
+            switchedArea = null;
 
-        $("div.body").children().show();
+            $("div.body").children().show();
+        }
         return null;
     };
 
         return switchedArea;
     };
 
+    Rakka.scrollToTopLeft = function () {
+        $("div.center").each(function () {
+            this.scrollTop  = 0;
+            this.scrollLeft = 0;
+        });
+    };
+
     var waitingMessageBoard = null;
 
     Rakka.displayWaitingMessage = function (msg) {