Merge branch '1327-Desplazamiento-elementos-que-contiene-hipervículo-sin-enable-link-en-consola-visual' into 'develop'

Fix - Horizontal scrolling of elements with hyperlink in label for VC - #1327

See merge request !817
This commit is contained in:
vgilc 2017-09-14 11:38:06 +02:00
commit cd31d560ea
1 changed files with 12 additions and 2 deletions

View File

@ -282,7 +282,12 @@ $ignored_params['refr'] = '';
$('.item:not(.icon) img:not(.b64img)').each( function() {
if ($(this).css('float')=='left' || $(this).css('float')=='right') {
if( $(this).parent()[0].tagName == 'DIV'){
$(this).css('margin-top',(parseInt($(this).parent().css('height'))/2-parseInt($(this).css('height'))/2)+'px');
}
else if ( $(this).parent()[0].tagName == 'A') {
$(this).css('margin-top',(parseInt($(this).parent().parent().css('height'))/2-parseInt($(this).css('height'))/2)+'px');
}
$(this).css('margin-left','');
}
else {
@ -290,7 +295,12 @@ $ignored_params['refr'] = '';
$(this).css('margin-left','');
$(this).css('margin-top','');
} else {
if( $(this).parent()[0].tagName == 'DIV'){
$(this).css('margin-left',(parseInt($(this).parent().css('width'))/2-parseInt($(this).css('width'))/2)+'px');
}
else if ( $(this).parent()[0].tagName == 'A') {
$(this).css('margin-left',(parseInt($(this).parent().parent().css('width'))/2-parseInt($(this).css('width'))/2)+'px');
}
$(this).css('margin-top','');
}
}