From f417707d67bbb26b3824aae607bdb7538b97a756 Mon Sep 17 00:00:00 2001 From: Santhosh Thottingal Date: Mon, 22 Dec 2014 16:38:03 +0530 Subject: [PATCH] Remove the unused code to sync region highlight on scroll Change-Id: Id779c25237584f90ab9132fe24f6cbade1b58da7 --- src/jquery.uls.lcd.js | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/src/jquery.uls.lcd.js b/src/jquery.uls.lcd.js index f0efe49..c3e8a1c 100644 --- a/src/jquery.uls.lcd.js +++ b/src/jquery.uls.lcd.js @@ -376,34 +376,6 @@ lcd.options.clickhandler.call( this, $( this ).data( 'code' ) ); } ); } - - // The region section need to be in sync with the map filter. - lcd.$element.scroll( function () { - var inview, inviewRegion, - $ulsLanguageList = $( this ), - scrollTop = $ulsLanguageList.position().top, - scrollBottom = $ulsLanguageList.height(); - - // The region section need to be in sync with the map filter. - inviewRegion = 'WW'; - lcd.$element.find( '.uls-lcd-region-section' ).each( function () { - var $lcdRegionSection = $( this ), - top = $lcdRegionSection.position().top, - height = $lcdRegionSection.height(), - padding = 10; - - if ( top - padding <= scrollTop && height > scrollBottom ) { - inviewRegion = $lcdRegionSection.attr( 'id' ); - } - } ); - - // highlight the region visible while scrolling in the map. - inview = $.uls.data.regiongroups[ inviewRegion ]; - if ( !$( '#uls-region-' + inview ).hasClass( 'active' ) ) { - $( '.regionselector' ).removeClass( 'active' ); - $( '#uls-region-' + inview ).addClass( 'active' ); - } - } ); } };