Skip to content

Commit

Permalink
Started on call to action for first slide
Browse files Browse the repository at this point in the history
Inverted navigation, animate in navigation
  • Loading branch information
zachwise committed Sep 11, 2014
1 parent ba7f072 commit d8be73a
Show file tree
Hide file tree
Showing 36 changed files with 225 additions and 52 deletions.
2 changes: 1 addition & 1 deletion compiled/css/storymap.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion compiled/css/storymap.dark.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion compiled/js/locale/de.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion compiled/js/locale/es.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion compiled/js/locale/fr.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion compiled/js/locale/it.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions compiled/js/locale/jp.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions compiled/js/locale/nl.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion compiled/js/locale/no.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion compiled/js/locale/pl.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion compiled/js/locale/sr.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion compiled/js/locale/sv.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion compiled/js/locale/zh-cn.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions compiled/js/locale/zh-tw.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions compiled/js/storymap-min.js

Large diffs are not rendered by default.

69 changes: 65 additions & 4 deletions compiled/js/storymap.js
Original file line number Diff line number Diff line change
Expand Up @@ -2560,7 +2560,8 @@ VCO.Language = {
lang: "en",
messages: {
loading: "Loading",
wikipedia: "From Wikipedia, the free encyclopedia"
wikipedia: "From Wikipedia, the free encyclopedia",
start: "Explore"
},
buttons: {
map_overview: "Map Overview",
Expand Down Expand Up @@ -3343,14 +3344,19 @@ VCO.DomMixins = {

/* Animate to Position
================================================== */
animatePosition: function(pos, el) {
animatePosition: function(pos, el, use_percent) {
var ani = {
duration: this.options.duration,
easing: this.options.ease
};
for (var name in pos) {
if (pos.hasOwnProperty(name)) {
ani[name] = pos[name] + "px";
if (use_percent) {
ani[name] = pos[name] + "%";
} else {
ani[name] = pos[name] + "px";
}

}
}

Expand Down Expand Up @@ -5709,7 +5715,8 @@ VCO.Media.Text = VCO.Class.extend({
content_container: {},
content: {},
headline: {},
date: {}
date: {},
start_btn: {}
},

// Data
Expand Down Expand Up @@ -6704,6 +6711,7 @@ VCO.SlideNav = VCO.Class.extend({
};

this.animator = null;
this.animator_position = null;

// Merge Data and Options
VCO.Util.mergeData(this.options, options);
Expand Down Expand Up @@ -6741,6 +6749,49 @@ VCO.SlideNav = VCO.Class.extend({
}
},

/* Position
================================================== */
updatePosition: function(pos, use_percent, duration, ease, start_value) {
trace("updatePosition")
var ani = {
duration: duration,
easing: ease
};
var _start_value = start_value;

for (var name in pos) {
if (pos.hasOwnProperty(name)) {
if (use_percent) {
ani[name] = pos[name] + "%";
} else {
ani[name] = pos[name] + "px";
}

}
}

trace(ani)
//this.animatePosition(pos, this._el.container, use_percent);
if (this.animator_position) {
this.animator_position.stop();
}

var prop_to_set;
if (ani.right) {
prop_to_set = "right";
} else {
prop_to_set = "left";
}
if (use_percent) {
this._el.container.style[prop_to_set] = _start_value + "%";
} else {
this._el.container.style[prop_to_set] = _start_value + "px";
}
trace("start_value " + _start_value)
this.animator_position = VCO.Animate(this._el.container, ani);

},

/* Events
================================================== */
_onMouseClick: function() {
Expand Down Expand Up @@ -6895,6 +6946,7 @@ VCO.StorySlider = VCO.Class.extend({
this.goTo(this.options.start_at_slide);

this._onLoaded();
this._introInterface();
},

/* Public
Expand Down Expand Up @@ -7264,6 +7316,14 @@ VCO.StorySlider = VCO.Class.extend({
this.goTo(this.current_slide, true, true);
},

_introInterface: function() {
//this._slides[0].
trace("_introInterface");

this._nav.next.updatePosition({right:"130"}, false, this.options.duration, this.options.ease*3, -100);
this._nav.previous.updatePosition({left:"-100"}, true, this.options.duration, this.options.ease*3, "100");
},

/* Init
================================================== */
_initLayout: function () {
Expand Down Expand Up @@ -7404,6 +7464,7 @@ VCO.StorySlider = VCO.Class.extend({
_onLoaded: function() {
this.fire("loaded", this.data);
this.fire("title", {title:this._slides[0].title});

}


Expand Down
55 changes: 44 additions & 11 deletions config.codekit
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,28 @@
"outputStyle": 1,
"syntaxCheckerStyle": 1
},
"\/compiled\/js\/locale\/jp.js": {
"fileType": 64,
"ignore": 1,
"ignoreWasSetByUser": 0,
"inputAbbreviatedPath": "\/compiled\/js\/locale\/jp.js",
"outputAbbreviatedPath": "\/compiled\/js\/locale\/min\/jp-min.js",
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 0,
"outputStyle": 1,
"syntaxCheckerStyle": 1
},
"\/compiled\/js\/locale\/nl.js": {
"fileType": 64,
"ignore": 1,
"ignoreWasSetByUser": 0,
"inputAbbreviatedPath": "\/compiled\/js\/locale\/nl.js",
"outputAbbreviatedPath": "\/compiled\/js\/locale\/min\/nl-min.js",
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 0,
"outputStyle": 1,
"syntaxCheckerStyle": 1
},
"\/compiled\/js\/locale\/no.js": {
"fileType": 64,
"ignore": 1,
Expand Down Expand Up @@ -463,6 +485,17 @@
"outputStyle": 1,
"syntaxCheckerStyle": 1
},
"\/compiled\/js\/locale\/zh-tw.js": {
"fileType": 64,
"ignore": 1,
"ignoreWasSetByUser": 0,
"inputAbbreviatedPath": "\/compiled\/js\/locale\/zh-tw.js",
"outputAbbreviatedPath": "\/compiled\/js\/locale\/min\/zh-tw-min.js",
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 0,
"outputStyle": 1,
"syntaxCheckerStyle": 1
},
"\/compiled\/js\/storymap-min.js": {
"fileType": 64,
"ignore": 1,
Expand Down Expand Up @@ -981,7 +1014,7 @@
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 1,
"outputStyle": 1,
"syntaxCheckerStyle": 1
"syntaxCheckerStyle": 0
},
"\/source\/js\/language\/locale\/fr.js": {
"fileType": 64,
Expand All @@ -992,7 +1025,7 @@
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 1,
"outputStyle": 1,
"syntaxCheckerStyle": 1
"syntaxCheckerStyle": 0
},
"\/source\/js\/language\/locale\/it.js": {
"fileType": 64,
Expand All @@ -1003,7 +1036,7 @@
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 1,
"outputStyle": 1,
"syntaxCheckerStyle": 1
"syntaxCheckerStyle": 0
},
"\/source\/js\/language\/locale\/jp.js": {
"fileType": 64,
Expand All @@ -1014,7 +1047,7 @@
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 1,
"outputStyle": 1,
"syntaxCheckerStyle": 1
"syntaxCheckerStyle": 0
},
"\/source\/js\/language\/locale\/nl.js": {
"fileType": 64,
Expand All @@ -1025,7 +1058,7 @@
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 1,
"outputStyle": 1,
"syntaxCheckerStyle": 1
"syntaxCheckerStyle": 0
},
"\/source\/js\/language\/locale\/no.js": {
"fileType": 64,
Expand All @@ -1036,7 +1069,7 @@
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 1,
"outputStyle": 1,
"syntaxCheckerStyle": 1
"syntaxCheckerStyle": 0
},
"\/source\/js\/language\/locale\/pl.js": {
"fileType": 64,
Expand All @@ -1047,7 +1080,7 @@
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 1,
"outputStyle": 1,
"syntaxCheckerStyle": 1
"syntaxCheckerStyle": 0
},
"\/source\/js\/language\/locale\/sr.js": {
"fileType": 64,
Expand All @@ -1058,7 +1091,7 @@
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 1,
"outputStyle": 1,
"syntaxCheckerStyle": 1
"syntaxCheckerStyle": 0
},
"\/source\/js\/language\/locale\/sv.js": {
"fileType": 64,
Expand All @@ -1069,7 +1102,7 @@
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 1,
"outputStyle": 1,
"syntaxCheckerStyle": 1
"syntaxCheckerStyle": 0
},
"\/source\/js\/language\/locale\/zh-cn.js": {
"fileType": 64,
Expand All @@ -1080,7 +1113,7 @@
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 1,
"outputStyle": 1,
"syntaxCheckerStyle": 1
"syntaxCheckerStyle": 0
},
"\/source\/js\/language\/locale\/zh-tw.js": {
"fileType": 64,
Expand All @@ -1091,7 +1124,7 @@
"outputPathIsOutsideProject": 0,
"outputPathIsSetByUser": 1,
"outputStyle": 1,
"syntaxCheckerStyle": 1
"syntaxCheckerStyle": 0
},
"\/source\/js\/language\/VCO.Language.js": {
"fileType": 64,
Expand Down
9 changes: 7 additions & 2 deletions source/js/dom/VCO.DomMixins.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,19 @@ VCO.DomMixins = {

/* Animate to Position
================================================== */
animatePosition: function(pos, el) {
animatePosition: function(pos, el, use_percent) {
var ani = {
duration: this.options.duration,
easing: this.options.ease
};
for (var name in pos) {
if (pos.hasOwnProperty(name)) {
ani[name] = pos[name] + "px";
if (use_percent) {
ani[name] = pos[name] + "%";
} else {
ani[name] = pos[name] + "px";
}

}
}

Expand Down
3 changes: 2 additions & 1 deletion source/js/language/VCO.Language.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ VCO.Language = {
lang: "en",
messages: {
loading: "Loading",
wikipedia: "From Wikipedia, the free encyclopedia"
wikipedia: "From Wikipedia, the free encyclopedia",
start: "Explore"
},
buttons: {
map_overview: "Map Overview",
Expand Down
3 changes: 2 additions & 1 deletion source/js/language/locale/de.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ VCO.Language = {
lang: "de",
messages: {
loading: "Daten werden geladen",
wikipedia: "von Wikipedia, der freien Enzyklopädie"
wikipedia: "von Wikipedia, der freien Enzyklopädie",
start: "Explore"
},
buttons: {
map_overview: "Kartenübersicht",
Expand Down
3 changes: 2 additions & 1 deletion source/js/language/locale/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ VCO.Language = {
lang: "es",
messages: {
loading: "cargando",
wikipedia: "de Wikipedia, la enciclopedia libre"
wikipedia: "de Wikipedia, la enciclopedia libre",
start: "Explore"
},
buttons: {
map_overview: "vista general del mapa",
Expand Down
3 changes: 2 additions & 1 deletion source/js/language/locale/fr.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ VCO.Language = {
lang: "fr",
messages: {
loading: "Chargement",
wikipedia: "Extrait de Wikipédia, l'encyclopédie libre"
wikipedia: "Extrait de Wikipédia, l'encyclopédie libre",
start: "Explore"
},
buttons: {
map_overview: "Vue d'ensemble de la carte",
Expand Down
Loading

0 comments on commit d8be73a

Please sign in to comment.