Browse Source

Fixes #1656. is occurring would not return correct value. Add repeat detection when queue: false

pull/1698/merge
jlukic 9 years ago
parent
commit
4d6de1428e
2 changed files with 8 additions and 5 deletions
  1. 2
      RELEASE-NOTES.md
  2. 11
      src/definitions/modules/transition.js

2
RELEASE-NOTES.md

@ -3,6 +3,7 @@
### Version 1.8.0 - January 21, 2015
**Enhancements**
- **Transition** - Transition will now prevent repeated animations when using an inferred direction i.e. animation without `in` or `out` specified. When `queue: true` only animations with explicit direction will be ignored.
- **Transition** - Transition duration now defaults to what is specified in `css`, to set custom duration you can still pass at run-time as a different value
- **Dropdown** - Keyboard navigation will now allow opening of sub menus with right/left arrow. Enter will open sub-menus on an unselectable category (`allowCategorySelection: false`) as well.
- **Dropdown** - Mutation observers will now observe changed in `<select>` values after initialization, and will automatically update dropdown menu when changed
@ -24,6 +25,7 @@
- **API** - Fixed bug where `$.api('get xhr')` was not correctly returning xhr promise
- **Sidebar** - Fixed bug with `pusher` inheriting first child margins due to `margin-collapse`
- **Sidebar** - Sidebar will now only close if you click on `pusher` or underlayed `body` (scale out). Clicking on fixed elements will not close sidebar.
- **Sidebar** - Mobile `is mobile` was using RegExp `test()` which would return an incorrect value when called multiple times
- *Sticky** - Fixes issue with container size not being set explicitly on rail due to improper method renaming
- **Search** - Search results no longer hide/show when user changes tab or page loses focus
- **Transition** - Fixed bug with animations that contain the strings 'in' or 'out' as part of their names, for example "swing"

11
src/definitions/modules/transition.js

@ -135,7 +135,7 @@ $.fn.transition = function() {
module.debug('Preparing animation', settings.animation);
if(module.is.animating()) {
if(settings.queue) {
if(!settings.allowRepeats && module.has.direction() && module.is.occuring() && module.queuing !== true) {
if(!settings.allowRepeats && module.has.direction() && module.is.occurring() && module.queuing !== true) {
module.error(error.repeated, settings.animation, $module);
}
else {
@ -143,8 +143,9 @@ $.fn.transition = function() {
}
return false;
}
else {
else if(!settings.allowRepeats && module.is.occurring()) {
module.error(error.repeated, settings.animation, $module);
return false;
}
}
if( module.can.animate() ) {
@ -643,9 +644,9 @@ $.fn.transition = function() {
looping: function() {
return $module.hasClass(className.looping);
},
occuring: function(animation) {
occurring: function(animation) {
animation = animation || settings.animation;
animation = animation.replace(' ', '.');
animation = '.' + animation.replace(' ', '.');
return ( $module.filter(animation).length > 0 );
},
visible: function() {

Loading…
Cancel
Save