Skip to content

Commit

Permalink
[0.3.2] Update builds.
Browse files Browse the repository at this point in the history
  • Loading branch information
chinchang committed Oct 31, 2015
1 parent c13cd5e commit e57ab1b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#Setup
1. [Fork **cta.js**](https://help.github.com/articles/fork-a-repo) and clone it on your system.
2. Create a new branch out off `dev` for your fix/feature. `git checkout new-feature dev`
2. Create a new branch out off `master` for your fix/feature. `git checkout new-feature master`

#Things to remember

Expand Down
21 changes: 11 additions & 10 deletions dist/cta.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! cta.js - v0.3.1 - 2015-05-02
/*! cta.js - v0.3.2 - 2015-10-31
* http://kushagragour.in/lab/ctajs/
* Copyright (c) 2015 Kushagra Gour; Licensed MIT */

Expand Down Expand Up @@ -90,6 +90,12 @@
};

function cta(trigger, target, options, callback) {
// Support optional arguments
if (typeof options === 'function') {
callback = options;
options = {};
}

if (!isSupportedBrowser) {
if (callback) {
callback(target);
Expand All @@ -101,18 +107,13 @@
triggerBackground,
targetBounds,
triggerBounds,
dummy,
extraTransitionDuration = 1;
dummy;

// Support optional arguments
if (typeof options === 'function') {
callback = options;
options = {};
}
options = options || {};
options.duration = options.duration || defaults.duration;
options.targetShowDuration = options.targetShowDuration || getAnimationTime(target) || defaults.targetShowDuration;
options.relativeToWindow = options.relativeToWindow || defaults.relativeToWindow;
options.extraTransitionDuration = options.extraTransitionDuration || defaults.extraTransitionDuration;

// Set some properties to make the target visible so we can get its dimensions.
// Set `display` to `block` only when its already hidden. Otherwise changing an already visible
Expand Down Expand Up @@ -172,11 +173,11 @@
callback(target);
}
// Animate the dummy element to zero opacity while the target is getting rendered.
dummy.style.transitionDuration = (options.targetShowDuration + extraTransitionDuration) + 's';
dummy.style.transitionDuration = (options.targetShowDuration + options.extraTransitionDuration) + 's';
dummy.style.opacity = 0;
setTimeout(function () {
dummy.parentNode.removeChild(dummy);
}, (options.targetShowDuration + extraTransitionDuration) * 1000);
}, (options.targetShowDuration + options.extraTransitionDuration) * 1000);
});

// Return a reverse animation function for the called animation.
Expand Down
4 changes: 2 additions & 2 deletions dist/cta.min.js

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "cta",
"title": "cta.js",
"description": "A light-weight performant library to animate your 'action-to-effect' paths",
"version": "0.3.1",
"version": "0.3.2",
"homepage": "http://kushagragour.in/lab/ctajs/",
"author": {
"name": "Kushagra Gour",
Expand Down

0 comments on commit e57ab1b

Please sign in to comment.