1 // ==========================================================================
  2 // Project:   SproutCore
  3 // Copyright: @2013 7x7 Software, Inc.
  4 // License:   Licensed under MIT license (see license.js)
  5 // ==========================================================================
  6 
  7 
  8 SC.mixin(SC.View,
  9   /** @scope SC.View */ {
 10 
 11   /** @class
 12 
 13     To modify the smooth animation, you may set the following transition
 14     options in `transitionAdjustOptions`:
 15 
 16       - duration {Number} the number of seconds for the animation.  Default: 0.4
 17 
 18     @extends SC.ViewTransitionProtocol
 19     @see SC.View#animate for other timing functions.
 20     @since Version 1.10
 21   */
 22   SMOOTH_ADJUST: {
 23 
 24     /** @private */
 25     run: function (view, options, finalLayout) {
 26       var key,
 27         value;
 28 
 29       view.animate(finalLayout, {
 30         delay: options.delay || 0,
 31         duration: options.duration || 0.4,
 32         timing: options.timing || 'ease'
 33       }, function (data) {
 34         this.didTransitionAdjust();
 35       });
 36     }
 37   }
 38 
 39 });
 40