Browse Source

Calling show without animation now sets display type

pull/1896/head
jlukic 10 years ago
parent
commit
ecc3c8a3e0
2 changed files with 21 additions and 12 deletions
  1. 6
      RELEASE-NOTES.md
  2. 27
      src/definitions/modules/transition.js

6
RELEASE-NOTES.md

@ -8,13 +8,17 @@
**Enhancements**
- **Loader** - `inline loader` now has a `centered` variation
- **Transition** - Added `toggle` behavior and docs for `show` and `hide`
- **Transition** - transition now has `stop`, `stop all`, and `clear queue` for removing transitions, (undocumented method `stop`, and `start` renamed to `enable` and `disable`)
**Bugs**
- **Transition** - Fixed display state other than `block` not determined when using `show` and `hide` without an animation
- **Menu** - Fix vertical pointing menu, sub menu arrow color
- **Item ** - `img` inside of `ui item content` now do not receive formatting by default
- **Item ** - `img` inside of `ui item content` now do not receive size formatting by default
- **Form** - Added `input[type="search"]` styles to `ui form`
**Docs**
- **Transition** - Adds examples of `hide, `show`, `toggle`, `stop`, `stop all`, and `clear queue`
- **Item** - Significant rewrite of `ui item` documentation
### Version 1.10.1-2 - February 24, 2015

27
src/definitions/modules/transition.js

@ -219,7 +219,6 @@ $.fn.transition = function() {
module.verbose('Animation is outward, showing element');
module.restore.conditions();
module.show();
module.set.display();
settings.onShow.call(this);
}
else {
@ -436,7 +435,7 @@ $.fn.transition = function() {
},
queueCallback: function() {
$module.off('.queue' + eventNamespace)
}
},
completeCallback: function() {
$module.off('.complete' + eventNamespace);
},
@ -667,6 +666,8 @@ $.fn.transition = function() {
.css('display')
;
module.verbose('Determining final display state', displayType);
module.save.displayType(displayType);
$clone.remove();
if(currentAnimation != inAnimation) {
module.debug('Direction exists for animation', animation);
@ -680,7 +681,6 @@ $.fn.transition = function() {
module.debug('Static animation found', animation, displayType);
directionExists = false;
}
module.save.displayType(displayType);
module.save.transitionExists(animation, directionExists);
}
return (transitionExists !== undefined)
@ -738,18 +738,28 @@ $.fn.transition = function() {
module.verbose('Showing element', display);
module.remove.hidden();
module.set.visible();
module.set.display();
module.repaint();
},
toggle: function() {
if( module.is.visible() ) {
module.hide();
}
else {
module.show();
}
},
stop: function() {
module.debug('Stopping current animation');
module.complete();
$module.trigger(animationEnd);
},
stopAll: function() {
module.debug('Stopping all animation');
module.remove.animationCallbacks();
module.complete();
module.remove.queueCallback();
$module.trigger(animationEnd);
},
clear: {
@ -769,11 +779,6 @@ $.fn.transition = function() {
$module.addClass(className.disabled);
},
toggle: function() {
module.debug('Toggling play status');
$module.toggleClass(className.disabled);
},
setting: function(name, value) {
module.debug('Changing setting', name, value);
if( $.isPlainObject(name) ) {

Loading…
Cancel
Save