From 418cc11e6f09d3ca7c0ea47f7331fdfa922c2981 Mon Sep 17 00:00:00 2001 From: Ali Ok Date: Tue, 5 May 2015 13:50:35 +0200 Subject: [PATCH] Removed unused local variable `levelsClimbed` Variable `levelsClimbed` was not used at all and is now removed. Local variable `levelsClimbed` in `scrollController#anchorScroll` --- js/angular/controller/scrollController.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/js/angular/controller/scrollController.js b/js/angular/controller/scrollController.js index 37995ec334..79e4f9ba1d 100644 --- a/js/angular/controller/scrollController.js +++ b/js/angular/controller/scrollController.js @@ -152,12 +152,11 @@ function($scope, return; } var curElm = elm; - var scrollLeft = 0, scrollTop = 0, levelsClimbed = 0; + var scrollLeft = 0, scrollTop = 0; do { if (curElm !== null) scrollLeft += curElm.offsetLeft; if (curElm !== null) scrollTop += curElm.offsetTop; curElm = curElm.offsetParent; - levelsClimbed++; } while (curElm.attributes != self.element.attributes && curElm.offsetParent); scrollView.scrollTo(scrollLeft, scrollTop, !!shouldAnimate); });