Fixed problems with size elements in visual console. ticket: #4096

This commit is contained in:
m-lopez-f 2016-10-25 11:41:59 +02:00
parent 714e7a7a87
commit 5985753326
2 changed files with 6 additions and 4 deletions

View File

@ -189,8 +189,8 @@ switch ($action) {
case 'get_layout_data': case 'get_layout_data':
$layoutData = db_get_row_filter('tlayout_data', $layoutData = db_get_row_filter('tlayout_data',
array('id' => $id_element)); array('id' => $id_element));
$layoutData['height'] = $layoutData['height'] + 60; $layoutData['height'] = $layoutData['height'];
$layoutData['width'] = $layoutData['width'] + 60; $layoutData['width'] = $layoutData['width'];
echo json_encode($layoutData); echo json_encode($layoutData);
break; break;

View File

@ -95,8 +95,8 @@ function visual_map_print_item($mode = "read", $layoutData,
require_once ($config["homedir"] . '/include/functions_custom_graphs.php'); require_once ($config["homedir"] . '/include/functions_custom_graphs.php');
//add 60 px for visual console map //add 60 px for visual console map
$width = $layoutData['width'] + 60; $width = $layoutData['width'];
$height = $layoutData['height'] + 60; $height = $layoutData['height'];
$max_percentile = $layoutData['height']; $max_percentile = $layoutData['height'];
$top = $layoutData['pos_y']; $top = $layoutData['pos_y'];
$left = $layoutData['pos_x']; $left = $layoutData['pos_x'];
@ -749,6 +749,8 @@ function visual_map_print_item($mode = "read", $layoutData,
$percentile = 100; $percentile = 100;
break; break;
case MODULE_GRAPH: case MODULE_GRAPH:
$width += 60;
$height += 60;
if (!empty($proportion)) { if (!empty($proportion)) {
$width = $width =
((integer)($proportion['proportion_width'] * $width)); ((integer)($proportion['proportion_width'] * $width));