Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Author hide

  • Loading branch information...
commit aca1a34a5f6c80e18499250d4bd646dbbc03612a 1 parent 63ada90
@jakearchibald authored
Showing with 25 additions and 2 deletions.
  1. +23 −0 js/mankini/Builder.js
  2. +2 −2 js/mankini/utils.js
View
23 js/mankini/Builder.js
@@ -10,6 +10,7 @@
this._notes = new mankini.Notes( 1 );
this._pointer = new mankini.Pointer();
this._pointer.$container.appendTo( document.body );
+ this._$authorInfo = $('.author');
this._initControls();
this._stateNames = [];
@@ -71,6 +72,8 @@
this._arrow =
this._image =
this._bullets = undefined;
+
+ this._authorShow();
};
BuilderProto.transition = function(type) {
@@ -126,6 +129,26 @@
});
};
+ BuilderProto.authorHide = function() {
+ var builder = this;
+
+ return this.action(function( animate, $slide ) {
+ builder._$authorInfo.addClass('hide');
+ });
+ };
+
+ BuilderProto._authorShow = function(animate) {
+ this._$authorInfo.removeClass('hide');
+ };
+
+ BuilderProto.authorShow = function() {
+ var builder = this;
+
+ return this.action(function( animate, $slide ) {
+ builder._authorShow( animate );
+ });
+ };
+
BuilderProto.notes = function() {
var noteStrings = toArray( arguments ),
builder = this;
View
4 js/mankini/utils.js
@@ -49,14 +49,14 @@ $.fn.fullHeight = function() {
function transition(animate, $items, props, opts) {
if (animate) {
- $items.transition(props, opts);
+ $items.transitionStop(true).transition(props, opts);
}
else {
if (opts && !opts.easing) {
opts.easing = 'easeInOutQuad';
}
- $items.vendorCss(props);
+ $items.transitionStop(true).vendorCss(props);
if ( opts && opts.complete ) {
opts.complete();
Please sign in to comment.
Something went wrong with that request. Please try again.