function FluidbookLinks(fluidbook) {
this.fluidbook = fluidbook;
+ this.showLinkAnimating = false;
this.lastTriggeredLinksPage = -1;
try {
this.zoom = new FluidbookLinksZoom(fluidbook);
});
$(document).on(this.fluidbook.input.clickEvent, '[data-showid]:not([data-showmode="showonhover"])', function () {
-
+ if ($this.showLinkAnimating) {
+ return false;
+ }
+ $this.showLinkAnimating = true;
+ setTimeout(function () {
+ $this.showLinkAnimating = false;
+ }, 1000);
var mode = $(this).data('showmode');
var ids = $(this).data('showid').toString().split(',');
}
var current = $(this).data('current-showid');
+ if (current === undefined) {
+ $.each(ids, function (k, id) {
+ if ($('[data-id="' + id + '"].show').length > 0) {
+ current = id;
+ console.log(current);
+ }
+ }
+ );
+ }
if (current === undefined) {
showid = [ids[0]];
} else {
}
if (mode === 'exclusiveshow' || mode === 'shownext' || mode === 'shownextcycle' || mode === 'showprev' || mode === 'showprevcycle' || mode === 'pickrandom') {
+
var selector = 'div.link[data-hidden="1"].show';
var hide = [];
// Only hide links that are in the list
selector += ':not([data-id$="' + id + '"])';
});
$(selector).each(function () {
- var timeout = (mode === 'shownext' || mode === 'shownextcycle' || mode === 'showprev' || mode === 'showprevcycle') ? 1000 : 0;
+ var timeout = (mode === 'shownext' || mode === 'shownextcycle' || mode === 'showprev' || mode === 'showprevcycle') ? 900 : 0;
if ($(selector).is('[data-animation-hide]')) {
timeout = 0;
}
$(p).find('.linkshowclose').remove();
setTimeout(function () {
$(p).hide();
- }, 1000)
+ }, 500)
}, timeout);
},