com web/php: Fix the element edges when zooming in: js/common.js

From: Date: Tue, 01 Apr 2014 06:44:02 +0000
Subject: com web/php: Fix the element edges when zooming in: js/common.js
Groups: php.webmaster 
Request: Send a blank email to php-webmaster+get-22121@lists.php.net to get a copy of this message
Commit: 1a20b5be630dfd4dfc6214fa01755ea75a4db828 Author: Hannes Magnusson <bjori@mongodb.com> 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]');

« previous php.webmaster (#22121) next »