PageSourceSearch

https://sunypoly.edu/themes/sunny_theme/js/suny-gallery.js%3Fv=10.3.8

js sunypoly.edu collected 2026-10-09 16:46:44 UTC 2,239 bytes, 63 lines download raw bytes

1(function ($, Drupal, drupalSettings, storage) {
2	$(function(){
3		if( $('body').hasClass('node--type-gallery')){
4			$(window).on('resize', function(){
5				var height = $('.node--type-gallery .views_slideshow_cycle_teaser_section > div:visible img').height();
6				$('.node--type-gallery .views_slideshow_cycle_teaser_section').height(height);
7				resizeThumbWrapper();
8			});
9		}
10	});
11})(jQuery, Drupal, drupalSettings, window.localStorage);
12
13
14function sunyGalleryPagerOnPagerEvent(zeroBasedSlideIndex, slideElement){
15	
16}
17
18function sunyGalleryPagerOnPrevNextEvent(isNext, zeroBasedSlideIndex, slideElement){
19	
20}
21
22function resizeThumbWrapper(){
23	var calculatedW = 0;
24	jQuery('.node--type-gallery .widget_pager .views_slideshow_pager_field_item').map(function(ind,item){
25		calculatedW+= jQuery(item).outerWidth(true);
26	});
27	if(calculatedW>0)jQuery('.node--type-gallery .widget_pager_items_wrapper > div').width(calculatedW + 35);
28}
29
30function sunyGalleryPagerOnAfter(currSlideElement, nextSlideElement, options){
31	console.log('lets calculate');
32	var currentIndex = jQuery(nextSlideElement).index();
33	var thumb = jQuery('.node--type-gallery .widget_pager .views_slideshow_pager_field_item:eq('+currentIndex+')');
34	
35	var container = jQuery('.node--type-gallery .widget_pager_items_wrapper > div'),
36    	scrollTo = thumb,
37    	wrapper = jQuery('.node--type-gallery .widget_pager_items_wrapper');
38
39	//console.log(scrollTo.offset().left);
40	//console.log(container.position().left);
41	//console.log(wrapper.scrollLeft());
42	resizeThumbWrapper();
43	//console.log(calculatedW);
44	if( jQuery('.node--type-gallery .widget_pager_items_wrapper').width() < (scrollTo.position().left + scrollTo.outerWidth(true)) || currentIndex==0){
45		/*
46		wrapper.scrollLeft(
47			scrollTo.position().left
48		);
49
50		// Or you can animate the scrolling:
51		wrapper.animate({
52			scrollLeft: scrollTo.position().left
53		});
54		*/
55		container.css('transform','translateX(-'+scrollTo.position().left+'px)')
56	} else if ( (scrollTo.position().left + scrollTo.outerWidth(true)) < jQuery('.node--type-gallery .widget_pager_items_wrapper').width() ){
57		container.css('transform','translateX(0px)')
58	}
59}
60
61function sunyGalleryPagerThumbCalculation(isNext, zeroBasedSlideIndex, slideElement){
62	
63}

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.