Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

reduce the perspective slightly

  • Loading branch information...
commit dcc6612f859d67b3662cce1aff11803949d76e71 1 parent d53964f
@hakimel hakimel authored
Showing with 8 additions and 6 deletions.
  1. +5 −5 css/meny.css
  2. +3 −1 js/meny.js
View
10 css/meny.css
@@ -53,11 +53,11 @@ body {
-o-transition: -o-perspective .4s ease;
transition: perspective .4s ease;
- -webkit-perspective: 600px;
- -moz-perspective: 600px;
- -ms-perspective: 600px;
- -o-perspective: 600px;
- perspective: 600px;
+ -webkit-perspective: 800px;
+ -moz-perspective: 800px;
+ -ms-perspective: 800px;
+ -o-perspective: 800px;
+ perspective: 800px;
-webkit-perspective-origin: 0% 50%;
-moz-perspective-origin: 0% 50%;
View
4 js/meny.js
@@ -33,7 +33,7 @@
lastTouchX = event.touches[0].clientX;
if( event.target.nodeName !== 'A' && ( isActive || lastTouchX < activateX ) ) {
- event.preventDefault();
+
document.addEventListener( 'touchmove', onTouchMove, false );
document.addEventListener( 'touchend', onTouchEnd, false );
@@ -45,9 +45,11 @@
if( isActive && x < lastTouchX - activateX ) {
deactivate();
+ event.preventDefault();
}
else if( !isActive && lastTouchX < activateX && x > lastTouchX + activateX ) {
activate();
+ event.preventDefault();
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.