Skip to content

Commit

Permalink
Animation uses Emitter instead of string and defaults to automatic, see
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Oct 28, 2018
1 parent 38e97b0 commit 2469b76
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 3 additions & 2 deletions js/Carousel.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ define( function( require ) {
var Shape = require( 'KITE/Shape' );
var sun = require( 'SUN/sun' );
var Tandem = require( 'TANDEM/Tandem' );
var timer = require( 'PHET_CORE/timer' );
var Util = require( 'DOT/Util' );
var VSeparator = require( 'SUN/VSeparator' );

Expand Down Expand Up @@ -70,7 +71,7 @@ define( function( require ) {
// animation, scrolling between pages
animationEnabled: true, // {boolean} is animation enabled when scrolling between pages?,
animationDuration: 0.4, // {number} seconds
stepper: 'manual' // {string} see Animation options.stepper
animationStepEmitter: timer // {string} see Animation options.animationStepEmitter
};
assert && Object.freeze( DEFAULT_OPTIONS );

Expand Down Expand Up @@ -271,7 +272,7 @@ define( function( require ) {
// options that are independent of orientation
var animationOptions = {
duration: options.animationDuration,
stepper: options.stepper,
animationStepEmitter: options.animationStepEmitter,
easing: Easing.CUBIC_IN_OUT
};

Expand Down
5 changes: 1 addition & 4 deletions js/demo/ComponentsScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ define( function( require ) {
var vCarousel = new Carousel( vItems, {
orientation: 'vertical',
separatorsVisible: true,
stepper: 'timer',
buttonTouchAreaXDilation: 5,
buttonTouchAreaYDilation: 15,
buttonMouseAreaXDilation: 2,
Expand All @@ -95,7 +94,6 @@ define( function( require ) {
// horizontal carousel
var hCarousel = new Carousel( hItems, {
orientation: 'horizontal',
stepper: 'timer',
buttonTouchAreaXDilation: 15,
buttonTouchAreaYDilation: 5,
buttonMouseAreaXDilation: 7,
Expand Down Expand Up @@ -310,8 +308,7 @@ define( function( require ) {
// carousel
var carousel = new Carousel( items, {
orientation: 'horizontal',
itemsPerPage: 3,
stepper: 'timer'
itemsPerPage: 3
} );

// page control
Expand Down

0 comments on commit 2469b76

Please sign in to comment.