Browse Source

fixes bug in testing for transitions in transition.js

Former-commit-id: 69e7b9483c
Former-commit-id: 6be5ef2968
pull/258/head
Jack Lukic 11 years ago
parent
commit
735be913e3
8 changed files with 58 additions and 30 deletions
  1. 14
      build/minified/modules/transition.js
  2. 14
      build/packaged/modules/transition.js
  3. 6
      build/uncompressed/modules/transition.css
  4. 14
      build/uncompressed/modules/transition.js
  5. 6
      node/src/files/components/semantic/modules/transition.css
  6. 14
      node/src/files/components/semantic/modules/transition.js
  7. 14
      src/modules/transition.js
  8. 6
      src/modules/transition.less

14
build/minified/modules/transition.js

@ -314,7 +314,7 @@ $.fn.transition = function() {
animationName: function() { animationName: function() {
var var
element = document.createElement('element'),
element = document.createElement('div'),
animations = { animations = {
'animation' :'animationName', 'animation' :'animationName',
'OAnimation' :'oAnimationName', 'OAnimation' :'oAnimationName',
@ -334,7 +334,7 @@ $.fn.transition = function() {
animationEvent: function() { animationEvent: function() {
var var
element = document.createElement('element'),
element = document.createElement('div'),
animations = { animations = {
'animation' :'animationend', 'animation' :'animationend',
'OAnimation' :'oAnimationEnd', 'OAnimation' :'oAnimationEnd',
@ -367,17 +367,18 @@ $.fn.transition = function() {
}, },
transition: function() { transition: function() {
var var
currentAnimation = $module.css(animationName),
inAnimation = $module.addClass(className.inward).css(animationName)
$clone = $('<div>').addClass( $module.attr('class') ).appendTo($('body')),
currentAnimation = $clone.css(animationName),
inAnimation = $clone.addClass(className.inward).css(animationName)
; ;
if(currentAnimation != inAnimation) { if(currentAnimation != inAnimation) {
module.debug('In/out transitions exist'); module.debug('In/out transitions exist');
$module.removeClass(className.inward);
$clone.remove();
return true; return true;
} }
else { else {
module.debug('Static animation found'); module.debug('Static animation found');
$module.removeClass(className.inward);
$clone.remove();
return false; return false;
} }
} }
@ -597,6 +598,7 @@ $.fn.transition.settings = {
transition : 'ui transition', transition : 'ui transition',
animating : 'animating', animating : 'animating',
looping : 'looping', looping : 'looping',
loading : 'loading',
disabled : 'disabled', disabled : 'disabled',
hidden : 'hidden', hidden : 'hidden',
visible : 'visible', visible : 'visible',

14
build/packaged/modules/transition.js

@ -314,7 +314,7 @@ $.fn.transition = function() {
animationName: function() { animationName: function() {
var var
element = document.createElement('element'),
element = document.createElement('div'),
animations = { animations = {
'animation' :'animationName', 'animation' :'animationName',
'OAnimation' :'oAnimationName', 'OAnimation' :'oAnimationName',
@ -334,7 +334,7 @@ $.fn.transition = function() {
animationEvent: function() { animationEvent: function() {
var var
element = document.createElement('element'),
element = document.createElement('div'),
animations = { animations = {
'animation' :'animationend', 'animation' :'animationend',
'OAnimation' :'oAnimationEnd', 'OAnimation' :'oAnimationEnd',
@ -367,17 +367,18 @@ $.fn.transition = function() {
}, },
transition: function() { transition: function() {
var var
currentAnimation = $module.css(animationName),
inAnimation = $module.addClass(className.inward).css(animationName)
$clone = $('<div>').addClass( $module.attr('class') ).appendTo($('body')),
currentAnimation = $clone.css(animationName),
inAnimation = $clone.addClass(className.inward).css(animationName)
; ;
if(currentAnimation != inAnimation) { if(currentAnimation != inAnimation) {
module.debug('In/out transitions exist'); module.debug('In/out transitions exist');
$module.removeClass(className.inward);
$clone.remove();
return true; return true;
} }
else { else {
module.debug('Static animation found'); module.debug('Static animation found');
$module.removeClass(className.inward);
$clone.remove();
return false; return false;
} }
} }
@ -597,6 +598,7 @@ $.fn.transition.settings = {
transition : 'ui transition', transition : 'ui transition',
animating : 'animating', animating : 'animating',
looping : 'looping', looping : 'looping',
loading : 'loading',
disabled : 'disabled', disabled : 'disabled',
hidden : 'hidden', hidden : 'hidden',
visible : 'visible', visible : 'visible',

6
build/uncompressed/modules/transition.css

@ -43,6 +43,12 @@
/******************************* /*******************************
States States
*******************************/ *******************************/
/* Loading */
.ui.loading.transition {
position: absolute;
top: -999999px;
left: -99999px;
}
/* Hidden */ /* Hidden */
.ui.hidden.transition { .ui.hidden.transition {
display: none; display: none;

14
build/uncompressed/modules/transition.js

@ -314,7 +314,7 @@ $.fn.transition = function() {
animationName: function() { animationName: function() {
var var
element = document.createElement('element'),
element = document.createElement('div'),
animations = { animations = {
'animation' :'animationName', 'animation' :'animationName',
'OAnimation' :'oAnimationName', 'OAnimation' :'oAnimationName',
@ -334,7 +334,7 @@ $.fn.transition = function() {
animationEvent: function() { animationEvent: function() {
var var
element = document.createElement('element'),
element = document.createElement('div'),
animations = { animations = {
'animation' :'animationend', 'animation' :'animationend',
'OAnimation' :'oAnimationEnd', 'OAnimation' :'oAnimationEnd',
@ -367,17 +367,18 @@ $.fn.transition = function() {
}, },
transition: function() { transition: function() {
var var
currentAnimation = $module.css(animationName),
inAnimation = $module.addClass(className.inward).css(animationName)
$clone = $('<div>').addClass( $module.attr('class') ).appendTo($('body')),
currentAnimation = $clone.css(animationName),
inAnimation = $clone.addClass(className.inward).css(animationName)
; ;
if(currentAnimation != inAnimation) { if(currentAnimation != inAnimation) {
module.debug('In/out transitions exist'); module.debug('In/out transitions exist');
$module.removeClass(className.inward);
$clone.remove();
return true; return true;
} }
else { else {
module.debug('Static animation found'); module.debug('Static animation found');
$module.removeClass(className.inward);
$clone.remove();
return false; return false;
} }
} }
@ -597,6 +598,7 @@ $.fn.transition.settings = {
transition : 'ui transition', transition : 'ui transition',
animating : 'animating', animating : 'animating',
looping : 'looping', looping : 'looping',
loading : 'loading',
disabled : 'disabled', disabled : 'disabled',
hidden : 'hidden', hidden : 'hidden',
visible : 'visible', visible : 'visible',

6
node/src/files/components/semantic/modules/transition.css

@ -43,6 +43,12 @@
/******************************* /*******************************
States States
*******************************/ *******************************/
/* Loading */
.ui.loading.transition {
position: absolute;
top: -999999px;
left: -99999px;
}
/* Hidden */ /* Hidden */
.ui.hidden.transition { .ui.hidden.transition {
display: none; display: none;

14
node/src/files/components/semantic/modules/transition.js

@ -314,7 +314,7 @@ $.fn.transition = function() {
animationName: function() { animationName: function() {
var var
element = document.createElement('element'),
element = document.createElement('div'),
animations = { animations = {
'animation' :'animationName', 'animation' :'animationName',
'OAnimation' :'oAnimationName', 'OAnimation' :'oAnimationName',
@ -334,7 +334,7 @@ $.fn.transition = function() {
animationEvent: function() { animationEvent: function() {
var var
element = document.createElement('element'),
element = document.createElement('div'),
animations = { animations = {
'animation' :'animationend', 'animation' :'animationend',
'OAnimation' :'oAnimationEnd', 'OAnimation' :'oAnimationEnd',
@ -367,17 +367,18 @@ $.fn.transition = function() {
}, },
transition: function() { transition: function() {
var var
currentAnimation = $module.css(animationName),
inAnimation = $module.addClass(className.inward).css(animationName)
$clone = $('<div>').addClass( $module.attr('class') ).appendTo($('body')),
currentAnimation = $clone.css(animationName),
inAnimation = $clone.addClass(className.inward).css(animationName)
; ;
if(currentAnimation != inAnimation) { if(currentAnimation != inAnimation) {
module.debug('In/out transitions exist'); module.debug('In/out transitions exist');
$module.removeClass(className.inward);
$clone.remove();
return true; return true;
} }
else { else {
module.debug('Static animation found'); module.debug('Static animation found');
$module.removeClass(className.inward);
$clone.remove();
return false; return false;
} }
} }
@ -597,6 +598,7 @@ $.fn.transition.settings = {
transition : 'ui transition', transition : 'ui transition',
animating : 'animating', animating : 'animating',
looping : 'looping', looping : 'looping',
loading : 'loading',
disabled : 'disabled', disabled : 'disabled',
hidden : 'hidden', hidden : 'hidden',
visible : 'visible', visible : 'visible',

14
src/modules/transition.js

@ -314,7 +314,7 @@ $.fn.transition = function() {
animationName: function() { animationName: function() {
var var
element = document.createElement('element'),
element = document.createElement('div'),
animations = { animations = {
'animation' :'animationName', 'animation' :'animationName',
'OAnimation' :'oAnimationName', 'OAnimation' :'oAnimationName',
@ -334,7 +334,7 @@ $.fn.transition = function() {
animationEvent: function() { animationEvent: function() {
var var
element = document.createElement('element'),
element = document.createElement('div'),
animations = { animations = {
'animation' :'animationend', 'animation' :'animationend',
'OAnimation' :'oAnimationEnd', 'OAnimation' :'oAnimationEnd',
@ -367,17 +367,18 @@ $.fn.transition = function() {
}, },
transition: function() { transition: function() {
var var
currentAnimation = $module.css(animationName),
inAnimation = $module.addClass(className.inward).css(animationName)
$clone = $('<div>').addClass( $module.attr('class') ).appendTo($('body')),
currentAnimation = $clone.css(animationName),
inAnimation = $clone.addClass(className.inward).css(animationName)
; ;
if(currentAnimation != inAnimation) { if(currentAnimation != inAnimation) {
module.debug('In/out transitions exist'); module.debug('In/out transitions exist');
$module.removeClass(className.inward);
$clone.remove();
return true; return true;
} }
else { else {
module.debug('Static animation found'); module.debug('Static animation found');
$module.removeClass(className.inward);
$clone.remove();
return false; return false;
} }
} }
@ -597,6 +598,7 @@ $.fn.transition.settings = {
transition : 'ui transition', transition : 'ui transition',
animating : 'animating', animating : 'animating',
looping : 'looping', looping : 'looping',
loading : 'loading',
disabled : 'disabled', disabled : 'disabled',
hidden : 'hidden', hidden : 'hidden',
visible : 'visible', visible : 'visible',

6
src/modules/transition.less

@ -52,6 +52,12 @@
States States
*******************************/ *******************************/
/* Loading */
.ui.loading.transition {
position: absolute;
top: -999999px;
left: -99999px;
}
/* Hidden */ /* Hidden */
.ui.hidden.transition { .ui.hidden.transition {

Loading…
Cancel
Save