summaryrefslogtreecommitdiff
path: root/public/assets/js/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/assets/js/app.js')
-rw-r--r--public/assets/js/app.js21
1 files changed, 12 insertions, 9 deletions
diff --git a/public/assets/js/app.js b/public/assets/js/app.js
index bfd317b..504375b 100644
--- a/public/assets/js/app.js
+++ b/public/assets/js/app.js
@@ -68,9 +68,12 @@ var app = (function() {
debounce(function() {
$(".item").addClass("hidden")
setTimeout(function(){
- $(".cell, .next, .previous").css({ 'height': ($(".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")
- $('.top').flickity('resize')
+ // $('.top').flickity('resize')
$('body').removeClass('resizing')
}, 20)
}, 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")