Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vertical Slider - Height not properly set #947

Open
ercgeek opened this issue Sep 14, 2020 · 0 comments
Open

Vertical Slider - Height not properly set #947

ercgeek opened this issue Sep 14, 2020 · 0 comments

Comments

@ercgeek
Copy link

ercgeek commented Sep 14, 2020

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:

  • I added the following after line 450: var origHeight = this.element.style.height;
  • I added the following after line 680: this.sliderElem.style.height = origHeight;

Is there a different way to handle this use case?

Thanks,
Enrique

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant