Remove the unused code to sync region highlight on scroll
Change-Id: Id779c25237584f90ab9132fe24f6cbade1b58da7
This commit is contained in:
@@ -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' );
|
||||
}
|
||||
} );
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user