Skip to content

Commit

Permalink
Updated component to version 1.11.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Semantic-Pusher-Robot committed Mar 5, 2015
1 parent 3731c5a commit dfe3548
Show file tree
Hide file tree
Showing 9 changed files with 240 additions and 175 deletions.
10 changes: 10 additions & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
### Version 1.11.0 - March 3, 2015

- **Transition** - Added more reasonable default durations for each animation
- **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`)
- **Transition** - Fixes `swing out` animations not working correctly
- **Transition** - Fixed display state other than `block` not determined when using `show` and `hide` without an animation
- **Transition** - Fix bug in `remove looping` causing next animation to use same duration
- **Transition** - Adds examples of `hide, `show`, `toggle`, `stop`, `stop all`, and `clear queue`

### Version 1.10.0 - February 23, 2015

- **Transition** - Transitions now have `interval` to allow grouped elements to animate one by one with a delay between each animation. Grouped animations determine order based on transition direction to avoid reflows, or can manually be reversed by using <code>reverse: true</code> [See Examples](http://www.semantic-ui.com/modules/transition.html#grouped-transitions) for more details.
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
"framework"
],
"license": "MIT",
"version": "1.10.4"
"version": "1.11.0"
}
77 changes: 55 additions & 22 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* # Semantic UI 1.10.4 - Transition
* # Semantic UI 1.11.0 - Transition
* http://github.com/semantic-org/semantic-ui/
*
*
Expand Down Expand Up @@ -187,7 +187,7 @@ $.fn.transition = function() {

reset: function() {
module.debug('Resetting animation to beginning conditions');
module.remove.animationEndCallback();
module.remove.animationCallbacks();
module.restore.conditions();
module.remove.animating();
},
Expand All @@ -196,7 +196,7 @@ $.fn.transition = function() {
module.debug('Queueing animation of', animation);
module.queuing = true;
$module
.one(animationEnd + eventNamespace, function() {
.one(animationEnd + '.queue' + eventNamespace, function() {
module.queuing = false;
module.repaint();
module.animate.apply(this, settings);
Expand All @@ -206,7 +206,7 @@ $.fn.transition = function() {

complete: function (event) {
module.verbose('CSS animation complete', settings.animation);
module.remove.animationEndCallback();
module.remove.completeCallback();
module.remove.failSafe();
if(!module.is.looping()) {
if( module.is.outward() ) {
Expand All @@ -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 {
Expand Down Expand Up @@ -262,7 +261,7 @@ $.fn.transition = function() {
module.save.conditions();
}
module.remove.direction();
module.remove.animationEndCallback();
module.remove.completeCallback();
if(module.can.transition() && !module.has.direction()) {
module.set.direction();
}
Expand Down Expand Up @@ -396,8 +395,9 @@ $.fn.transition = function() {
module.verbose('Restoring original style attribute', module.cache.style);
$module.attr('style', module.cache.style);
}
if(module.is.looping()) {
module.remove.looping();
else {
module.verbose('Clearing style attribute');
$module.removeAttr('style');
}
module.verbose('Restoring original attributes', module.cache);
}
Expand Down Expand Up @@ -430,8 +430,15 @@ $.fn.transition = function() {
})
;
},
animationEndCallback: function() {
$module.off('.complete');
animationCallbacks: function() {
module.remove.queueCallback();
module.remove.completeCallback();
},
queueCallback: function() {
$module.off('.queue' + eventNamespace)
},
completeCallback: function() {
$module.off('.complete' + eventNamespace);
},
display: function() {
$module.css('display', '');
Expand All @@ -456,10 +463,12 @@ $.fn.transition = function() {
},
looping: function() {
module.debug('Transitions are no longer looping');
$module
.removeClass(className.looping)
;
module.forceRepaint();
if( module.is.looping() ) {
module.reset();
$module
.removeClass(className.looping)
;
}
},
transition: function() {
$module
Expand Down Expand Up @@ -660,6 +669,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);
Expand All @@ -673,7 +684,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)
Expand Down Expand Up @@ -731,24 +741,47 @@ $.fn.transition = function() {
module.verbose('Showing element', display);
module.remove.hidden();
module.set.visible();
module.set.display();
module.repaint();
},

start: function() {
toggle: function() {
if( module.is.visible() ) {
module.hide();
}
else {
module.show();
}
},

stop: function() {
module.debug('Stopping current animation');
$module.trigger(animationEnd);
},

stopAll: function() {
module.debug('Stopping all animation');
module.remove.queueCallback();
$module.trigger(animationEnd);
},

clear: {
queue: function() {
module.debug('Clearing animation queue')
module.remove.queueCallback();
}
},

enable: function() {
module.verbose('Starting animation');
$module.removeClass(className.disabled);
},

stop: function() {
disable: function() {
module.debug('Stopping animation');
$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) ) {
Expand Down
2 changes: 1 addition & 1 deletion package.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Package.describe({
name : 'semantic:ui-transition',
summary : 'Semantic UI - Transition: Single component release',
version : '1.10.4',
version : '1.11.0',
git : 'git://github.com/Semantic-Org/UI-Transition.git',
});

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "semantic-ui-transition",
"version": "1.10.4",
"version": "1.11.0",
"title": "Semantic UI - Transition",
"description": "Single component release of transition",
"homepage": "http://www.semantic-ui.com",
Expand Down
Loading

0 comments on commit dfe3548

Please sign in to comment.