}
},
updateShadows: function (page, animationDuration) {
- if (animationDuration == undefined) {
+ if (animationDuration === undefined) {
animationDuration = 0;
}
animationDuration *= 1000;
var delay, duration;
- if (animationDuration == 0) {
+ if (animationDuration === 0) {
delay = 0;
duration = 0;
} else {
duration = animationDuration * 0.3;
}
- var transitionIn = {transitionDuration: duration + 'ms', transitionDelay: delay + 'ms'};
- var transitionOut = {transitionDuration: (duration * .5) + 'ms', transitionDelay: '0ms'};
-
var left = true, right = true;
- if (this.displayOnePage) {
- right = true;
- } else {
- if ((page <= 1 && this.l10n.dir == 'ltr') || (page >= this.contentlock.getMaxPage() && this.l10n.dir == 'rtl')) {
+ if (!this.displayOnePage) {
+ if ((page <= 1 && this.l10n.dir === 'ltr') || (page >= this.contentlock.getMaxPage() && this.l10n.dir === 'rtl')) {
left = false;
- } else if ((page <= 1 && this.l10n.dir == 'rtl') || (page >= this.contentlock.getMaxPage() && this.l10n.dir == 'ltr')) {
+ } else if ((page <= 1 && this.l10n.dir === 'rtl') || (page >= this.contentlock.getMaxPage() && this.l10n.dir === 'ltr')) {
right = false;
}
}
var s = $("#shadow,#edges");
+ var s_in = [];
+ var s_out = [];
+
if (left) {
- $(s).children(".left.hidden").css(transitionIn).removeClass('hidden');
+ s_in.push(".left.hidden");
} else {
- $(s).children(".left:not('.hidden')").css(transitionOut).addClass('hidden');
+ s_out.push(".left:not('.hidden')");
}
if (right) {
- $(s).children(".right.hidden").css(transitionIn).removeClass('hidden');
+ s_in.push(".right.hidden");
} else {
- $(s).children(".right:not('.hidden')").css(transitionOut).addClass('hidden');
+ s_out.push(".right:not('.hidden')");
}
+ if (this.support.transitions2d && !this.support.iOS) {
+ var transitionIn = {transitionDuration: duration + 'ms', transitionDelay: delay + 'ms'};
+ var transitionOut = {transitionDuration: (duration * .5) + 'ms', transitionDelay: '0ms'};
+ if (s_in.length > 0) {
+ $(s).children(s_in.join(',')).css(transitionIn).removeClass('hidden');
+ }
+ if (s_out.length > 0) {
+ $(s).children(s_out.join(',')).css(transitionOut).addClass('hidden');
+ }
+
+ } else {
+ if (s_in.length > 0) {
+ setTimeout(function () {
+ $(s).children(s_in.join(',')).removeClass('hidden');
+ }, delay);
+ }
+ if(s_out.length>0) {
+ $(s).children(s_out.join(',')).addClass('hidden');
+ }
+ }
},
showAllButtons: function () {
$("#next,#previous").addClass('help').show();
.ios & {
transition-property: none !important;
- transition-duration: 0 !important;
+ transition-duration:0ms !important;
}
> .shadow {
}
#edges {
+
+ .ios & {
+ transition-property: none !important;
+ transition-duration:0ms !important;
+ }
+
position: absolute;
top: 0px;
left: 0px;
background-image: url("../images/edges/edge-right-middle.png");
}
}
+
+ .ios & {
+ transition-property: none !important;
+ transition-duration:0ms !important;
+ }
}
}