diff options
Diffstat (limited to 'public/assets/js/app.js')
| -rw-r--r-- | public/assets/js/app.js | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/public/assets/js/app.js b/public/assets/js/app.js index c6d31ec..2151dab 100644 --- a/public/assets/js/app.js +++ b/public/assets/js/app.js @@ -27,7 +27,7 @@ var app = (function() { document.addEventListener('touchmove', function(e) { e.preventDefault() }) - FastClick.attach(document.body) + // FastClick.attach(document.body) } $(window).resize(app.resize) @@ -68,9 +68,12 @@ var app = (function() { debounce(function() { $(".active.item").addClass("hidden") setTimeout(function(){ - $(".active .cell,.active .next,.active .previous").css({ 'height': ($(".active .top").height() + 'px'), 'display': 'inline-block' }) + $(".item").each(function(i){ + var height = window.innerHeight - $(this).find(".bottom").height() + $(".previous, .next, .cell, .top, .flickity-viewport", this).css({ 'height': height }) + }) app.view.$el.removeClass("hidden") - $('.active .top').flickity('resize') + // $('.top').flickity('resize') $('body').removeClass('resizing') }, 400) }, 400) @@ -81,10 +84,10 @@ var app = (function() { })() var heights = [] -$(".top").each(function(i){ - var height = $(this).height() - heights[i] = height - $(".cell", this).css({ 'height': (height + 'px') }) +$(".item").each(function(i){ + var height = window.innerHeight - $(this).find(".bottom").height() + console.log(height) + $(".cell, .top", this).css({ 'height': height }) }) $('.top').flickity(app.flickity_options).on( 'cellSelect', function(e) { @@ -92,9 +95,9 @@ $('.top').flickity(app.flickity_options).on( 'cellSelect', function(e) { app.header.updateSlideNumber( gallery.selectedIndex ) }) -$(".top").each(function(i){ - var height = heights[i] - $(".previous, .next", this).css({ 'height': (height + 'px') }) +$(".item").each(function(i){ + var height = window.innerHeight - $(this).find(".bottom").height() + $(".previous, .next, .flickity-viewport", this).css({ 'height': height }) }) $(".item").addClass("hidden") |
