mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-27 15:54:29 +02:00
Merge branch '844-Error-en-la-posición-al-crear-un-elemento-con-imagen-en-las-consolas-visuales' into 'develop'
Fix image align when create a static graph in vconsole - #844 See merge request !642
This commit is contained in:
commit
f10e67342d
@ -1521,7 +1521,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);
|
||||||
}
|
}
|
||||||
@ -1557,7 +1556,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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2029,6 +2027,10 @@ function createItem(type, values, id_data) {
|
|||||||
$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 {
|
||||||
$image.attr('width', values['width'])
|
$image.attr('width', values['width'])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user