Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Allow more animations, easings, animation dirations #107

Closed
johnpapa opened this Issue · 0 comments

1 participant

@johnpapa
Owner

Could not merge #86 , so I created new issue and revised the originally merge request. Decided to make breaking change, which is what the original request was for anyway :). Updated unit tests, set defaults, added comments, readme, updated version.

@johnpapa johnpapa was assigned
@johnpapa johnpapa closed this issue from a commit
@johnpapa johnpapa Updated for v 2.0.0rc1. ## Breaking Changes
Closes #86 and Closes #107

####Animation Changes
The following animations options have been deprecated and should be replaced:

 - Replace `options.fadeIn` with `options.showDuration`
 - Replace `options.onFadeIn` with `options.onShown`
 - Replace `options.fadeOut` with `options.hideDuration`
 - Replace `options.onFadeOut` with `options.onHidden`

### Animation Options
Toastr will supply default animations, so you do not have to provide any of these settings. However you have the option to override the animations if you like.

####Easings
Optionally override the animation easing to show or hide the toasts. Default is swing. swing and linear are built into jQuery.

 toastr.options.showEasing = 'swing';
 toastr.options.hideEasing = 'linear';

Using the jQuery Easing plugin (http://www.gsgd.co.uk/sandbox/jquery/easing/)

 toastr.options.showEasing = 'easeOutBounce';
 toastr.options.hideEasing = 'easeInBack';

####Animation Method
Use the jQuery show/hide method of your choice. These default to fadeIn/fadeOut. The methods fadeIn/fadeOut, slideDown/slideUp, and show/hide are built into jQuery.

 toastr.options.showMethod = 'slideDown';
 toastr.options.hideMethod = 'slideUp';
29fcfcb
@johnpapa johnpapa closed this in 29fcfcb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.