implemented left_end and right_end functions for GallerySlider