Skip to content

Loading…

orbitWidth not getting set on initialization #66

Open
wants to merge 1 commit into from

1 participant

@scottsampson

In my case the orbit.width() was being set to a value greater than the slide width. orbitWidth never gets set with this case causing the animations to fail. I added a way to set orbitWidth no matter if the slide width is greater or not. After writing this it might just be better to set a default in the initialization but you can do that.

@scottsampson scottsampson In my case the orbit.width() was being set to a value greater than th…
…e slide width. orbitWidth never gets set with this case causing the animations to fail. I added a way to set orbitWidth no matter if the slide width is greater or not. After writing this it might just be better to set a default in the initialization but you can do that.
31abf7e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 14, 2011
  1. @scottsampson

    In my case the orbit.width() was being set to a value greater than th…

    scottsampson committed
    …e slide width. orbitWidth never gets set with this case causing the animations to fail. I added a way to set orbitWidth no matter if the slide width is greater or not. After writing this it might just be better to set a default in the initialization but you can do that.
Showing with 9 additions and 5 deletions.
  1. +9 −5 jquery.orbit-1.2.3.js
View
14 jquery.orbit-1.2.3.js
@@ -59,12 +59,16 @@
_slideHeight = _slide.height();
if(_slideWidth > orbit.width()) {
orbit.add(orbitWrapper).width(_slideWidth);
- orbitWidth = orbit.width();
- }
- if(_slideHeight > orbit.height()) {
+ }
+ // setting this because orbit width is not always less than slidewidth
+ // and orbitHeight and width aren't initialized
+ orbitWidth = orbit.width();
+ if(_slideHeight > orbit.height()) {
orbit.add(orbitWrapper).height(_slideHeight);
- orbitHeight = orbit.height();
- }
+ }
+ // setting this because orbit height is not always less than slideheight
+ // and orbitHeight and width aren't initialized
+ orbitHeight = orbit.height();
numberSlides++;
});
Something went wrong with that request. Please try again.