From fd78562c4c74098e73a12b648c7b943782836029 Mon Sep 17 00:00:00 2001 From: RubaXa Date: Fri, 20 Dec 2013 16:34:19 +0400 Subject: [PATCH] * effects: title --- index.html | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index d7c75a7..c73fe1f 100644 --- a/index.html +++ b/index.html @@ -185,7 +185,7 @@
-

The JavaScript library for modern browsers and touch devices. No jQuery.

+

The JavaScript library for modern browsers and touch devices. No jQuery.

@@ -367,7 +367,8 @@ sort.destroy(); el.y = rect.top; el.w = rect.right - rect.left; el.h = rect.bottom - rect.top; - el.force = el.getAttribute('data-force') || 10; + el.fX = el.getAttribute('data-force-x') || el.getAttribute('data-force') || 10; + el.fY = el.getAttribute('data-force-y') || el.getAttribute('data-force') || 10; return el; }); @@ -393,8 +394,8 @@ sort.destroy(); var ry = winHeight/2 - y; items.forEach(function (el){ - var dx = el.w/el.force * (rx / -halfWidth); - var dy = el.h/el.force * (ry / halfHeight); + var dx = el.w/el.fX * (rx / -halfWidth); + var dy = el.h/el.fY * (ry / halfHeight); el.style['transform'] = el.style['-webkit-transform'] = 'translate3d('+dx+'px,'+dy+'px,0)'; });