From 5bbafb5aba5dacc63323717036a97eeadb9ecfa6 Mon Sep 17 00:00:00 2001
From: “Ryder <“r@okfoc.us”>
Date: Tue, 29 Mar 2016 17:20:22 -0400
Subject: item
---
public/assets/js/lib/ProjectView.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'public/assets/js/lib/ProjectView.js')
diff --git a/public/assets/js/lib/ProjectView.js b/public/assets/js/lib/ProjectView.js
index 1528f10..52ff128 100644
--- a/public/assets/js/lib/ProjectView.js
+++ b/public/assets/js/lib/ProjectView.js
@@ -12,8 +12,8 @@ var ProjectView = View.extend({
this.project_id = this.$el.data("id")
this.page_number = opt.page_number
console.log("INIT", this.project_id)
- $("
").addClass("page-up").insertBefore( this.$(".flickity-viewport") )
- $("
").addClass("page-down").insertAfter( this.$(".flickity-viewport") )
+ $("- ").addClass("page-up").insertBefore( this.$(".flickity-viewport") )
+ $("
- ").addClass("page-down").insertAfter( this.$(".flickity-viewport") )
},
show: function(){
--
cgit v1.2.3-70-g09d2
From b65a71fb6e34e8988eae5357a6d42ba5bb172539 Mon Sep 17 00:00:00 2001
From: “Ryder <“r@okfoc.us”>
Date: Tue, 29 Mar 2016 17:29:38 -0400
Subject: add active class
---
public/assets/js/app.js | 10 +++++-----
public/assets/js/lib/ProjectView.js | 3 ++-
2 files changed, 7 insertions(+), 6 deletions(-)
(limited to 'public/assets/js/lib/ProjectView.js')
diff --git a/public/assets/js/app.js b/public/assets/js/app.js
index bfd317b..c6d31ec 100644
--- a/public/assets/js/app.js
+++ b/public/assets/js/app.js
@@ -63,16 +63,16 @@ var app = (function() {
}
app.resize = function(){
- $(".cell, .next, .previous").css({ 'display': 'none' })
+ $(".active .cell,.active .next,.active .previous").css({ 'display': 'none' })
$('body').addClass('resizing')
debounce(function() {
- $(".item").addClass("hidden")
+ $(".active.item").addClass("hidden")
setTimeout(function(){
- $(".cell, .next, .previous").css({ 'height': ($(".top").height() + 'px'), 'display': 'inline-block' })
+ $(".active .cell,.active .next,.active .previous").css({ 'height': ($(".active .top").height() + 'px'), 'display': 'inline-block' })
app.view.$el.removeClass("hidden")
- $('.top').flickity('resize')
+ $('.active .top').flickity('resize')
$('body').removeClass('resizing')
- }, 20)
+ }, 400)
}, 400)
}
diff --git a/public/assets/js/lib/ProjectView.js b/public/assets/js/lib/ProjectView.js
index 52ff128..655d37e 100644
--- a/public/assets/js/lib/ProjectView.js
+++ b/public/assets/js/lib/ProjectView.js
@@ -22,7 +22,7 @@ var ProjectView = View.extend({
app.header.updateSlideCount( 1 )
$('body').removeClass('navopen')
this.$el.removeClass("hidden")
-
+ this.$el.addClass("active")
if (this.project_id == "cover") {
app.router.pushState("/")
}
@@ -39,6 +39,7 @@ var ProjectView = View.extend({
hide: function(){
addClassForPeriod( this.el, "hiding", app.navigation_delay, function(){
this.$el.addClass("hidden")
+ this.$el.removeClass("active")
}.bind(this) )
},
--
cgit v1.2.3-70-g09d2