jasny / bootstrap

The missing components for your favorite front-end framework.
https://www.jasny.net/bootstrap/
Apache License 2.0
2.68k stars 495 forks source link

Changing the animation speed #544

Open grahamthesmith opened 7 years ago

grahamthesmith commented 7 years ago

I have started using the off canvas push menu as demonstrated on your site, and it is working great. I am struggling however to get it to work with a slower animation. The css file has transition speed in the .canvas-sliding class, but modifying that is not enough. I have additionally tried to amend the js file by increasing the duration in the .animate method, but I end up with a jerky animation (starts at the right speed but then jumps to the open / closed position, depending on whether I am opening of closing the menu). It would be great if the speed could be added as an option in future, but for now any advice on what I can do to "fudge" the speed in the meantime would be appreciated.

poratuk commented 7 years ago

I added animation speed on the options to the Offcanvas in PR #547

grahamthesmith commented 7 years ago

Great thank you. Note that the CSS also needs to be changed to match whatever value is used in the new option though, so for example I set animateSpeed to 1000 and also:

.canvas-sliding {
  -webkit-transition: top 1s, left 1s, bottom 1s, right 1s;
          transition: top 1s, left 1s, bottom 1s, right 1s;
}

Its a shame that the CSS cannot also be modified by the new option ... or could it?