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

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

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