Permalink
Browse files

Add delay option to animation

  • Loading branch information...
koenbok committed Apr 19, 2014
1 parent b78ddb1 commit 2c1fd6db53e3e16ef84512f202482be4abcaba01
Showing with 20 additions and 10 deletions.
  1. +9 −4 build/framer.js
  2. +3 −1 extras/CactusFramerTest/static/app-cs.coffee
  3. +4 −2 src/animation.coffee
  4. +4 −3 todo.txt
@@ -1,7 +1,7 @@
// Framer 2.0-58-g4b76906 (c) 2013 Koen Bok
// Framer 2.0-59-gb78ddb1 (c) 2013 Koen Bok
// https://github.com/koenbok/Framer
window.FramerVersion = "2.0-58-g4b76906";
window.FramerVersion = "2.0-59-gb78ddb1";
(function(){var require = function (file, cwd) {
@@ -3533,7 +3533,7 @@ require.define("/src/animation.coffee",function(require,module,exports,__dirname
Animation = (function(_super) {
__extends(Animation, _super);
Animation.prototype.AnimationProperties = ["view", "properties", "curve", "time", "origin", "tolerance", "precision", "modifiers", "limits", "debug", "profile", "callback"];
Animation.prototype.AnimationProperties = ["view", "properties", "curve", "time", "origin", "tolerance", "precision", "modifiers", "limits", "debug", "profile", "callback", "delay"];
Animation.prototype.AnimatableCSSProperties = {
opacity: "",
@@ -3563,6 +3563,9 @@ require.define("/src/animation.coffee",function(require,module,exports,__dirname
if (this.curve == null) {
this.curve = "linear";
}
if (this.delay == null) {
this.delay = 0;
}
this.count = 0;
if (this.precision == null) {
this.precision = config.animationPrecision;
@@ -3676,7 +3679,9 @@ require.define("/src/animation.coffee",function(require,module,exports,__dirname
this.view.style["-webkit-transform-origin"] = this.origin;
}
css.addStyle(" " + this.keyFrameAnimationCSS + " ." + this.animationName + " { -webkit-animation-duration: " + (this.totalTime / 1000) + "s; -webkit-animation-name: " + this.animationName + "; -webkit-animation-timing-function: linear; -webkit-animation-fill-mode: both; -webkit-backface-visibility: " + backsideVisibility + "; }");
this.view.addClass(this.animationName);
utils.delay(this.delay, function() {
return _this.view.addClass(_this.animationName);
});
this.view.once("webkitAnimationStart", function(event) {
var endTime;
_this.emit("start", event);
@@ -1,3 +1,5 @@
view = new View
view.style.backgroundColor = null
view.animate
properties: {x:100}
delay: 3000
@@ -37,7 +37,7 @@ class Animation extends EventEmitter
AnimationProperties: [
"view", "properties", "curve", "time",
"origin", "tolerance", "precision", "modifiers",
"limits", "debug", "profile", "callback"
"limits", "debug", "profile", "callback", "delay"
]
AnimatableCSSProperties: {
opacity: "",
@@ -65,6 +65,7 @@ class Animation extends EventEmitter
# Set all the defaults
@time ?= 1000
@curve ?= "linear"
@delay ?= 0
@count = 0
@precision ?= config.animationPrecision
@@ -210,7 +211,8 @@ class Animation extends EventEmitter
-webkit-backface-visibility: #{backsideVisibility};
}"
@view.addClass @animationName
utils.delay @delay, =>
@view.addClass @animationName
########################################################
@@ -1,6 +1,7 @@
- Add a delay option to animations
+ Fix the draggable
- Fix the curve typo: https://www.facebook.com/groups/framerjs/permalink/469402916520118/
- Add a default width, height and color
- Fix frame error
- Make the invisible psd layers invisible in Framer too
+ Add a default width, height and color
+ Fix frame error
- Add view copy
- Make the invisible psd layers invisible in Framer too

0 comments on commit 2c1fd6d

Please sign in to comment.