woocommerce / FlexSlider

An awesome, fully responsive jQuery slider plugin
http://www.woocommerce.com/flexslider/
GNU General Public License v2.0
4.92k stars 1.69k forks source link

Translate3D moving thumbnail slider too far #1731

Closed DouglasEvans closed 1 month ago

DouglasEvans commented 6 years ago

I've used Flexslider with Advanced Custom Fields to create a slider with thumbnails based off a gallery that a user uploads, you can see an image of the example here

I've discovered that the thumbnail slider is moving too far, you can see where I have circled red above where the thumbnail for the current image is, and it should be much more in view. The translate3d moves a considerable amount, with 6 images in the slider the translation values are as follows:

If I was able to reduce these down to -230px and -423px respectively the problem would basically be solved. I had a look in the flexslider js script but all I could find was this:

`if (slider.transitions) {

if (slider.isFirefox) {

  target = (vertical) ? "translate3d(0," + target + ",0)" : "translate3d(" + (parseInt(target)+'px') + ",0,0)";

} else {

  target = (vertical) ? "translate3d(0," + target + ",0)" : "translate3d(" + ((slider.vars.rtl?-1:1)*parseInt(target)+'px') + ",0,0)";

}

dur = (dur !== undefined) ? (dur/1000) + "s" : "0s";

slider.container.css("-" + slider.pfx + "-transition-duration", dur);

 slider.container.css("transition-duration", dur); 

} `

Unfortunately modifying the values here is not doing anything for me, so I am a bit stuck on how to proceed to fix this issue. Thank you.