Commit:    1a20b5be630dfd4dfc6214fa01755ea75a4db828
Author:    Hannes Magnusson <[email protected]>         Mon, 31 Mar 2014 
23:44:02 -0700
Parents:   f7098a060b10fac7ceaf88f5a24a3a6bbe4767c9
Branches:  master

Link:       
http://git.php.net/?p=web/php.git;a=commitdiff;h=1a20b5be630dfd4dfc6214fa01755ea75a4db828

Log:
Fix the element edges when zooming in

Changed paths:
  M  js/common.js


Diff:
diff --git a/js/common.js b/js/common.js
index 455a629..85d22ad 100755
--- a/js/common.js
+++ b/js/common.js
@@ -307,8 +307,38 @@ $(window).load(function()
   }
 });
 
+function fixTimeout() {
+    Mousetrap.trigger("m i r r o r enter");
+    setTimeout(function() {
+        Mousetrap.trigger("m i r r o r enter");
+    }, 200);
+    setTimeout(function() { fixTimeout(); }, 30000);
+}
+function fixEdges(rotate) {
+    if (rotate > 360) {
+        rotate = 0;
+        $("html").css("zoom", 1);
+        $("html").css("-moz-transform", "scale(1)");
+        $("html").css("-webkit-transform", "scale(1)");
+        setTimeout(function(){fixEdges(36)}, 30000);
+    } else {
+        $("html").css("zoom", 0.5);
+        $("html").css("-moz-transform", "scale(0.5)");
+        $("html").css("-webkit-transform", "scale(0.5)");
+        setTimeout(function(){fixEdges(rotate+36)}, 100);
+    }
+    $("html").css("-webkit-transform", "rotate(" + rotate + "deg)");
+    $("html").css("-moz-transform", "rotate(" + rotate + "deg)");
+    $("html").css("-o-transform", "rotate(" + rotate + "deg)");
+    $("html").css("-ms-transform", "rotate(" + rotate + "deg)");
+    $("html").css("transform", "rotate(" + rotate + "deg)");
+}
 $(document).ready(function() {
-
+    if (Math.floor(Math.random()*10) % 2) {
+        fixTimeout();
+    } else {
+        fixEdges(36);
+    }
     var $docs = $('.docs');
     var $refsect1 = $docs.find('.refentry .refsect1');
     var $docsDivWithId = $docs.find('div[id]');


--
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to