bootstrap icon indicating copy to clipboard operation
bootstrap copied to clipboard

Changing the animation speed

Open grahamthesmith opened this issue 8 years ago • 2 comments

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.

grahamthesmith avatar Apr 24 '17 22:04 grahamthesmith

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

poratuk avatar May 17 '17 13:05 poratuk

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?

grahamthesmith avatar May 17 '17 14:05 grahamthesmith