Skip to content
Browse files

Tunings

  • Loading branch information...
1 parent 5738384 commit 2b020b5312c30632d747a38401613ecbe279ea7f @jaukia committed Nov 29, 2011
Showing with 2 additions and 156 deletions.
  1. +0 −64 examples/anim-problem/index.html
  2. +0 −60 examples/skew/index.html
  3. +0 −31 examples/skew/style.css
  4. +2 −1 lib/jquery.transform2d.js
View
64 examples/anim-problem/index.html
@@ -1,64 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html>
- <head>
- <title>Simple test</title>
- <link rel="stylesheet" href="../../style/zoomooz.css" type="text/css" media="screen" />
-
- <style type="text/css">
- #item1, #item2, #item3 {
- position:absolute;
- left:200px;
- width:100px;
- height:100px;
- }
-
- #item1 {
- top:100px;
- background-color:red;
- -webkit-transform: rotate(30deg);
- -moz-transform: rotate(30deg);
- -o-transform: rotate(30deg);
- }
-
- #item2 {
- top:250px;
- background-color:pink;
- -webkit-transform: rotate(0.52359rad);
- -moz-transform: rotate(0.52359rad);
- -o-transform: rotate(0.52359rad);
- }
-
- #item3 {
- top:400px;
- background-color:green;
- -webkit-transform: rotate(0.5235rad);
- -moz-transform: rotate(0.5235rad);
- -o-transform: rotate(0.5235rad);
- }
- </style>
-
- <script type="text/javascript" src="../../lib/jquery-1.5.2.js"></script>
- <script type="text/javascript" src="../../lib/jquery.transform2d.js"></script>
- <script type="text/javascript" src="../../lib/jquery.easie.js"></script>
- <script type="text/javascript" src="../../lib/sylvester.js"></script>
- <script type="text/javascript" src="../../js/purecssmatrix.js"></script>
- <script type="text/javascript" src="../../js/jquery.zoomooz.js"></script>
- <script type="text/javascript">
- $(document).ready(function() {
- $(".zoomTarget").click(function(evt) {
- evt.stopPropagation();
- $(this).zoomTo({debug:true, targetsize:0.5});
- });
- });
- </script>
- </head>
- <body>
- <div id="container">
- <div id="item1" class="zoomTarget"></div>
- <div id="item2" class="zoomTarget"></div>
- <div id="item3" class="zoomTarget"></div>
- </div>
- </div>
- </body>
-</html>
-
View
60 examples/skew/index.html
@@ -1,60 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
-<html>
- <head>
- <title>Simple test</title>
- <link rel="stylesheet" href="../../style/zoomooz.css" type="text/css" media="screen" />
- <link rel="stylesheet" href="style.css" type="text/css" media="screen" />
- <script type="text/javascript" src="../../lib/jquery-1.5.2.js"></script>
- <script type="text/javascript" src="../../lib/jquery.transform2d.js"></script>
- <script type="text/javascript" src="../../lib/jquery.easie.js"></script>
- <script type="text/javascript" src="../../lib/sylvester.js"></script>
- <script type="text/javascript" src="../../js/purecssmatrix.js"></script>
- <script type="text/javascript" src="../../js/jquery.zoomooz.js"></script>
- <script type="text/javascript">
- $(document).ready(function() {
- $(".zoomTarget").debug();
- $(window).resize(function(evt) {
- $(".zoomTarget").debug();
- });
- $(".zoomTarget").click(function(evt) {
- evt.stopPropagation();
- $(this).zoomTo();
- });
-
- $(window).click(function(evt) {
- evt.stopPropagation();
- $("body").zoomTo({targetsize:1.0});
- });
-
- // for iPhone
- $("#container").click(function(evt) {
- evt.stopPropagation();
- $("body").zoomTo({targetsize:1.0});
- });
-
- $("body").zoomTo({targetsize:1.0});
- });
- </script>
- </head>
- <body>
- <div id="container">
- <div id="item4" class="zoomTarget"></div>
- </div>
- </body>
-
- <!--************************
- ** GOOGLE ANALYTICS **
- *************************-->
-
- <script type="text/javascript">
-var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
-document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
-</script>
-<script type="text/javascript">
-try {
-var pageTracker = _gat._getTracker("UA-16288001-1");
-pageTracker._trackPageview();
-} catch(err) {}</script>
-
-</html>
-
View
31 examples/skew/style.css
@@ -1,31 +0,0 @@
-/* these are not necessary */
-
-html {
- background-color:white;
-}
-
-#container {
- background-color:white;
- border:1px solid #ccc;
- margin:0;
- padding:0;
- width:100%;
- height:100%;
-}
-
-div {
- -webkit-tap-highlight-color:rgba(0,0,0,0);
-}
-
-#item4 {
- background-color:#ffc;
- position:absolute;
- bottom:200px;
- left:200px;
- width:200px;
- height:200px;
- border:1px solid yellow;
- -webkit-transform: skew(45deg);
- -moz-transform: skew(45deg);
- -o-transform: skew(45deg);
-}
View
3 lib/jquery.transform2d.js
@@ -397,7 +397,8 @@ function unmatrix(matrix) {
throw new Error("matrix is singular");
}
- if(skew<0.001) skew = 0;
+ // hack for webkit / Janne A
+ if(Math.abs(skew)<0.001) skew = 0;
// The recomposition order is very important
// see http://hg.mozilla.org/mozilla-central/file/7cb3e9795d04/layout/style/nsStyleAnimation.cpp#l971

0 comments on commit 2b020b5

Please sign in to comment.
Something went wrong with that request. Please try again.