mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Fix image align when create a static graph in vconsole - #844
This commit is contained in:
parent
acbe200f90
commit
f2f7a8179f
@ -1518,7 +1518,6 @@ function set_static_graph_status(idElement, image, status) {
|
|||||||
data: parameter,
|
data: parameter,
|
||||||
success: function (data) {
|
success: function (data) {
|
||||||
set_static_graph_status(idElement, image, data);
|
set_static_graph_status(idElement, image, data);
|
||||||
|
|
||||||
if($('#'+idElement+' table').css('float') == 'right' || $('#'+idElement+ ' table').css('float') == 'left'){
|
if($('#'+idElement+' table').css('float') == 'right' || $('#'+idElement+ ' table').css('float') == 'left'){
|
||||||
$('#'+idElement+ ' img').css('margin-top', parseInt($('#'+idElement).css('height'))/2 - parseInt($('#'+idElement+ ' img').css('height'))/2);
|
$('#'+idElement+ ' img').css('margin-top', parseInt($('#'+idElement).css('height'))/2 - parseInt($('#'+idElement+ ' img').css('height'))/2);
|
||||||
}
|
}
|
||||||
@ -1554,7 +1553,6 @@ function set_static_graph_status(idElement, image, status) {
|
|||||||
suffix = ".png";
|
suffix = ".png";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
set_image("image", idElement, image + suffix);
|
set_image("image", idElement, image + suffix);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2025,6 +2023,10 @@ function createItem(type, values, id_data) {
|
|||||||
if($('#preview > img')[0].naturalWidth > 150 || $('#preview > img')[0].naturalHeight > 150){
|
if($('#preview > img')[0].naturalWidth > 150 || $('#preview > img')[0].naturalHeight > 150){
|
||||||
$image.attr('width', '70')
|
$image.attr('width', '70')
|
||||||
.attr('height', '70');
|
.attr('height', '70');
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
$image.attr('width', $('#preview > img')[0].naturalWidth)
|
||||||
|
.attr('height', $('#preview > img')[0].naturalHeight);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user