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

14
build/packaged/modules/transition.js

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

6
build/uncompressed/modules/transition.css

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

14
build/uncompressed/modules/transition.js

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

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

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

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

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

14
src/modules/transition.js

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

6
src/modules/transition.less

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

Loading…
Cancel
Save