diff --git a/lib/controller/dash/node_1.js b/lib/controller/dash/node_1.js index f352554..87639c8 100644 --- a/lib/controller/dash/node_1.js +++ b/lib/controller/dash/node_1.js @@ -24,8 +24,12 @@ var W = p.getWidth(); //var H=9*(W/16) - 28; - //var H = PanelH - p.ownerCt.ownerCt.getHeight() + 64; - var H = document.body.clientHeight - p.ownerCt.ownerCt.getHeight(); + var H = PanelH - p.ownerCt.getHeight() + 64; + //var H = document.body.clientHeight - p.ownerCt.ownerCt.getHeight(); + if( H > ( W * 0.5625 )+ 32 ){ + H = ( W * 0.5625 ) + 32; + }; + //alert( H ); //var W = 16*(H/9); //p.ownerCt.setWidth( W ); p.setHeight( H ); diff --git a/lib/controller/dash/node_3.js b/lib/controller/dash/node_3.js index 17f3e33..1ee40fb 100644 --- a/lib/controller/dash/node_3.js +++ b/lib/controller/dash/node_3.js @@ -25,7 +25,12 @@ var W = p.getWidth(); //var H=9*(W/16) - 28; //var H = PanelH - p.ownerCt.ownerCt.getHeight() + 64; - var H = document.body.clientHeight - p.ownerCt.ownerCt.getHeight(); + //var H = document.body.clientHeight - p.ownerCt.ownerCt.getHeight(); + var H = PanelH - p.ownerCt.getHeight() + 64; + //var H = document.body.clientHeight - p.ownerCt.ownerCt.getHeight(); + if( H > ( W * 0.5625 )+ 32 ){ + H = ( W * 0.5625 ) + 32; + }; //var W = 16*(H/9); //p.ownerCt.setWidth( W ); p.setHeight( H ); diff --git a/lib/controller/getDashBoardItems.php b/lib/controller/getDashBoardItems.php index ed0c3b8..8260dc8 100644 --- a/lib/controller/getDashBoardItems.php +++ b/lib/controller/getDashBoardItems.php @@ -132,6 +132,7 @@ _DATA_BOUNDARY; $STA = array(); $END="]}"; $OUT = array(); + if( $SP['type'] == 2 ) $SP['app_layout'] = 1; switch( $SP['app_layout'] ){ case 0:{ $STA[0]="{ columnWidth: .25, stylse:'padding:10px 0 10px 10px', items:["; diff --git a/lib/controller/report/node_3.js b/lib/controller/report/node_3.js index 228619b..e26d045 100644 --- a/lib/controller/report/node_3.js +++ b/lib/controller/report/node_3.js @@ -22,7 +22,12 @@ var W = p.getWidth(); //var H=9*(W/16) - 28; //var H = PanelH - p.ownerCt.ownerCt.getHeight() + 64; - var H = document.body.clientHeight - p.ownerCt.ownerCt.getHeight(); + //var H = document.body.clientHeight - p.ownerCt.ownerCt.getHeight(); + var H = PanelH - p.ownerCt.getHeight() + 64; + //var H = document.body.clientHeight - p.ownerCt.ownerCt.getHeight(); + if( H > W + 32 ){ + H = W + 32; + }; //var W = 16*(H/9); //p.ownerCt.setWidth( W ); p.setHeight( H ); diff --git a/lib/javascript/jsapi_dynamic/mojo_dashboard.js b/lib/javascript/jsapi_dynamic/mojo_dashboard.js index a256bdb..eaa85fb 100644 --- a/lib/javascript/jsapi_dynamic/mojo_dashboard.js +++ b/lib/javascript/jsapi_dynamic/mojo_dashboard.js @@ -782,11 +782,11 @@ function draw2DTargets( a ){ if( roi != null ) csvg.removeChild( roi ); var cpath = csvg.getElementById( "svg_mask_"+a ); var bBox; - if( cpath!=undefined){ - bBox = cpath.getBBox(); - } else { + //if( cpath!=undefined){ + // bBox = cpath.getBBox(); + //} else { bBox = csvg.getBBox(); - }; + //}; var max = 2048; switch( drawZoomLevels[a] ){ case 50: max = 1024; break; @@ -874,11 +874,11 @@ function draw2DMasks( a, zzz='' ){ masks_2d_shown[a] = []; var cpath = csvg.getElementById( "svg_mask_"+a ); var bBox; - if( cpath!=undefined){ - bBox = cpath.getBBox(); - } else { + //if( cpath!=undefined){ + // bBox = cpath.getBBox(); + //} else { bBox = csvg.getBBox(); - }; + //}; var colors=['#FF0000','#FFFF00','#00FF00','#203080','#0000FF','#FFFF00']; for( i = 0; i<6; i++){ masks_2d_shown[a][i] = []; @@ -974,11 +974,11 @@ function draw2DDraw( a, zzz = '' ){ if( csvg != undefined ){ var cpath = csvg.getElementById( "svg_mask_"+a ); var bBox; - if( cpath!=undefined){ - bBox = cpath.getBBox(); - } else { + //if( cpath!=undefined){ + // bBox = cpath.getBBox(); + //} else { bBox = csvg.getBBox(); - }; + //}; var newpath = document.createElementNS('http://www.w3.org/2000/svg', "polygon"); var ak = 2.0*Math.PI/draws_2d[a].length; //console.log( '1 box: '+ bBox.width+'x'+bBox.height ); diff --git a/lib/version.var b/lib/version.var index 8a8fb43..669bb3d 100644 --- a/lib/version.var +++ b/lib/version.var @@ -1 +1 @@ -20220701 \ No newline at end of file +20221115 \ No newline at end of file