Update the session variables for browser width and height when browser is resized

This commit is contained in:
Louis Bailleul
2015-11-19 14:14:29 +00:00
parent 6e1d234312
commit ce8e79c63a
2 changed files with 4 additions and 8 deletions

View File

@@ -37,13 +37,10 @@ else {
); );
}//end if }//end if
if($_SESSION['screen_width']) if($_SESSION['screen_width']) {
{ if($_SESSION['screen_width'] >= 800) {
if($_SESSION['screen_width'] >= 800)
{
$graph_array['width'] = ($_SESSION['screen_width'] - 400 )/count($periods)+1; $graph_array['width'] = ($_SESSION['screen_width'] - 400 )/count($periods)+1;
}else }else {
{
$graph_array['width'] = $_SESSION['screen_width'] - 155; $graph_array['width'] = $_SESSION['screen_width'] - 155;
} }
} }

View File

@@ -123,6 +123,7 @@ $(document).ready(function() {
}); });
}); });
updateResolution();
}); });
function submitCustomRange(frmdata) { function submitCustomRange(frmdata) {
@@ -165,5 +166,3 @@ $(document).on("click", '.collapse-neighbors', function(event)
list.toggle(); list.toggle();
continued.toggle(); continued.toggle();
}); });