From b0eea56188676da2ff58418c898ac262875f0092 Mon Sep 17 00:00:00 2001 From: Devin Despain Date: Tue, 28 Jul 2015 02:37:25 -0600 Subject: [PATCH] This change snaps the header to a pixel-perfect hide when the menu gets to within 99% of full-hide to compensate for scroll update lag --- ionic.headerShrink.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ionic.headerShrink.js b/ionic.headerShrink.js index 90312ca..688fb50 100644 --- a/ionic.headerShrink.js +++ b/ionic.headerShrink.js @@ -36,6 +36,9 @@ angular.module('ionic.ion.headerShrink', []) if(scrollTop >= 0) { y = Math.min(headerHeight / scrollDelay, Math.max(0, y + scrollTop - prevY)); + if( y*1.02 > headerHeight ){ + y = headerHeight + } } else { y = 0; }