diff --git a/app-addon/initializers/liquid-fire.js b/app-addon/initializers/liquid-fire.js index 3332800b..c6792cc6 100644 --- a/app-addon/initializers/liquid-fire.js +++ b/app-addon/initializers/liquid-fire.js @@ -1,3 +1,4 @@ +/* global $ */ import { initialize } from "vendor/liquid-fire"; import Ember from "ember"; @@ -5,6 +6,16 @@ export default { name: 'liquid-fire', initialize: function(container) { + if (!$ || !$.Velocity) { + Ember.warn("Velocity.js is missing"); + } else { + var version = $.Velocity.version; + var recommended = [0, 11, 8]; + if (Ember.compare(recommended, [version.major, version.minor, version.patch]) === 1) { + Ember.warn("You should probably upgrade Velocity.js, recommended minimum is " + recommended.join('.')); + } + } + initialize(container, container.lookupFactory('transitions:main')); if (Ember.testing) { Ember.Test.registerWaiter(function(){ diff --git a/app-addon/views/liquid-outlet.js b/app-addon/views/liquid-outlet.js index 283d4935..1adbbcf9 100644 --- a/app-addon/views/liquid-outlet.js +++ b/app-addon/views/liquid-outlet.js @@ -137,8 +137,7 @@ export default Ember.ContainerView.extend({ return animate(this, target, { duration: this._durationFor(before, after), queue: false, - easing: this.get('growEasing'), - display: null + easing: this.get('growEasing') }); } }, diff --git a/package.json b/package.json index f3980c97..8d1abf32 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "dependencies": { "broccoli-merge-trees": "^0.1.4", "broccoli-static-compiler": "^0.1.4", - "velocity-animate": "^0.9.0" + "velocity-animate": "^0.11.8" }, "devDependencies": { "body-parser": "^1.2.0", diff --git a/vendor-addon/liquid-fire/animate.js b/vendor-addon/liquid-fire/animate.js index 59dc23be..d5b5d67e 100644 --- a/vendor-addon/liquid-fire/animate.js +++ b/vendor-addon/liquid-fire/animate.js @@ -25,15 +25,12 @@ export function animate(view, props, opts, label) { opts = Ember.copy(opts); } - // By default, we ask velocity to reveal the elements at the start - // of animation. Our animated divs are all initially rendered at - // display:none to prevent a flash of before-animated content. - // - // At present, velocity's 'auto' just picks a value for the css - // display property based on the element type. I have a PR that - // would let it defer to the stylesheets instead. + // By default, we ask velocity to clear the element's `display` + // property at the start of animation. Our animated divs are all + // initially rendered at display:none to prevent a flash of + // before-animated content. if (typeof(opts.display) === 'undefined') { - opts.display = 'auto'; + opts.display = ''; } if (opts.progress) {