seiyria / bootstrap-slider

A slider control for Bootstrap 3 & 4.
http://seiyria.github.io/bootstrap-slider/
Other
3k stars 1.14k forks source link

Vertical Slider - Height not properly set #947

Open ercgeek opened 3 years ago

ercgeek commented 3 years ago

Big thanks for the very useful component. I'm not an expert on HTML/CSS/JS, apologies if I'm not properly using the component.

I have a page with a horizontal and a vertical slider. Setup as on the examples: sldHScroll = new Slider('#sldHScroll', { orientation: 'horizontal', handle: 'square' }); sldVScroll = new Slider('#sldVScroll', { orientation: 'vertical', handle: 'square' }

On my window.resize handler I try to set the width of the horizontal slider by setting style.width of #sldHScroll and the height of the vertical slider by setting style.height of #sldVScroll. The horizontal slider sets properly but the vertical slider height is always sets to 210 pixels regardless of my setting of style.height.

Editing bootstrap-slider.js solved the issue:

Is there a different way to handle this use case?

Thanks, Enrique