Browse Source

Merge 9a4b92ae5a into 6f2a912708

pull/5660/merge
Fernando Palacios 2 years ago
committed by GitHub
parent
commit
bd8899dafe
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 2 deletions
  1. 15
      src/definitions/modules/transition.js

15
src/definitions/modules/transition.js

@ -247,14 +247,25 @@ $.fn.transition = function() {
style = $module.attr('style'),
userStyle = module.get.userStyle(),
displayType = module.get.displayType(),
overrideStyle = userStyle + 'display: ' + displayType + ' !important;',
overrideStyle = userStyle + 'display: ' + displayType,
currentDisplay = $module.css('display'),
emptyStyle = (style === undefined || style === '')
;
if(currentDisplay !== displayType) {
module.verbose('Overriding default display to show element', displayType);
var
styleLines = overrideStyle.split(';'),
styles = {},
line
;
styleLines.forEach(function(style){
line = style.split(':');
if(line.length === 2) {
styles[line[0].trim()] = line[1].trim();
}
});
$module
.attr('style', overrideStyle)
.css(styles)
;
}
else if(emptyStyle) {

Loading…
Cancel
Save