Fixed visual console render img

This commit is contained in:
Daniel Maya 2017-06-22 11:55:30 +02:00
parent 87db7368c0
commit b19164cbd2
1 changed files with 7 additions and 2 deletions

View File

@ -284,8 +284,13 @@ $ignored_params['refr'] = '';
$(this).css('margin-left','');
}
else {
$(this).css('margin-left',(parseInt($(this).parent().parent().css('width'))/2-parseInt($(this).css('width'))/2)+'px');
$(this).css('margin-top','');
if(parseInt($(this).parent().parent().css('width'))/2-parseInt($(this).css('width'))/2 < 0){
$(this).css('margin-left','');
$(this).css('margin-top','');
} else {
$(this).css('margin-left',(parseInt($(this).parent().parent().css('width'))/2-parseInt($(this).css('width'))/2)+'px');
$(this).css('margin-top','');
}
}
});