|
|
{ id: 'db_node_%%%NODEID%%%', title: '%%%NODENAME%%%', draggable: false, collapsible: false, tools: [{ id:'toggle', handler: function( a, b, p ){ fsDrawID = %%%NODEID%%%; fullScreen( 'div_radar_%%%NODEID%%%' ); var el = document.getElementById('draw_svg_'+fsDrawID ); var nW = Math.floor( ( window.screen.height/window.screen.width ) * 100 ); el.removeAttribute("width"); el.setAttribute( "width", nW+'%' ); } }], listeners:{ afterrender: function(p){ masks_statuses[%%%NODEID%%%] = 0; masks_exist[%%%NODEID%%%] = 0; //alert( PanelH - p.ownerCt.ownerCt.getHeight() + 64+32 );
//alert( document.body.clientHeight - p.ownerCt.ownerCt.getHeight() );
//var expH = document.body.clientHeight - p.ownerCt.ownerCt.getHeight();
var W = p.getWidth(); var H = 9*(W/16) - 28; if( %%%APPTYPE%%% == 1 || %%%APPTYPE%%% == 4 ){ H = PanelH - p.ownerCt.getHeight() + 64; if( H > ( W * 0.5625 )+ 32 ){ H = ( W * 0.5625 ) + 32; }; } else { H = document.body.clientHeight - p.ownerCt.ownerCt.getHeight(); }; //var W = 16*(H/9);
//p.ownerCt.setWidth( W );
p.setHeight( H ); Ext.getCmp( 'cp_radar_%%%NODEID%%%' ).setHeight( H - 70 ); Ext.getCmp( 'cp_radar_%%%NODEID%%%' ).setWidth( H - 70 ); //alert( W+" "+H );
//Ext.getCmp( 'toolbox_%%%NODEID%%%' ).setWidth( W - H + 50 );
//Ext.getCmp( 'toolbox_%%%NODEID%%%' ).doLayout( false, true );
//if( H > W ){
//document.getElementById('draw_svg_%%%NODEID%%%').setAttribute("width", "100%" );
//} else {
document.getElementById('draw_svg_%%%NODEID%%%').setAttribute("width", H-80 ); //document.getElementById('draw_svg_%%%NODEID%%%').setAttribute("height", H-80 );//"100%" );
if( W > ( H+130 ) ) Ext.getCmp( 'toolbox_%%%NODEID%%%' ).expand( false ); //};
//alert( W +' '+ ( H+130 ) );
set2DZoomLevel( %%%NODEID%%%, 100 ); var el = document.getElementById('div_radar_%%%NODEID%%%'); el.addEventListener( "fullscreenchange", ( evt )=>{ if( document.fullscreenElement ){ } else { if( fsDrawID ){ var el = document.getElementById('draw_svg_'+fsDrawID ); el.removeAttribute("width"); el.setAttribute( "width", H-80 );//'86%' );
fsDrawID = 0; }; }; }); window.setTimeout( load2DDraw, 10*%%%NODEID%%%, %%%NODEID%%% ); } }, //layout: 'hbox',
layout:'border', items:[{ id: 'cp_radar_%%%NODEID%%%', region: 'center', html: '<div id="div_radar_%%%NODEID%%%" style="display: block; padding: 5px; width: \'100%\'; height: \'100%\';"><center><svg id="draw_svg_%%%NODEID%%%" opacity="0.3" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="86%" version="1.1" onclick="select2DROI( %%%NODEID%%%, event );" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd; cursor: crosshair;" viewBox="0 0 574 574" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><clipPath id="svg_mask_%%%NODEID%%%"><circle cx="287" cy="287" r="284"/></clipPath></defs><text id="g_txt_%%%NODEID%%%" text-anchor="left" transform="rotate(0,35,35)" x="35" y="35" fill="#FFF212" style="font: 30px sans-serif">100 m.</text><circle fill="#00A859" stroke="none" cx="287" cy="287" r="284"/><circle id="border_%%%NODEID%%%" fill="none" stroke="#373435" stroke-width="5.92139" cx="287" cy="287" r="284"/><circle id="r50_%%%NODEID%%%" fill="none" stroke="#FFF212" stroke-width="3.94741" cx="287" cy="287" r="142"/><text id="50_txt_%%%NODEID%%%" text-anchor="left" transform="rotate(45,140,140)" x="140" y="140" fill="#FFF212" style="font: 25px sans-serif">50</text><circle id="r25_%%%NODEID%%%" fill="none" stroke="#FFF212" stroke-width="2.96042" cx="287" cy="287" r="71"/><text id="25_txt_%%%NODEID%%%" text-anchor="left" transform="rotate(45,210,210)" x="210" y="210" fill="#FFF212" style="font: 15px sans-serif">25</text><circle id="r12_%%%NODEID%%%" fill="none" stroke="#FFF212" stroke-width="1.47993" cx="287" cy="287" r="34"/><text id="12_txt_%%%NODEID%%%" text-anchor="left" transform="rotate(45,245,245)" x="245" y="245" fill="#FFF212" style="font: 10px sans-serif">12.5</text><line fill="none" stroke="#FFF212" stroke-width="3.94741" x1="287" y1="3" x2="287" y2="571"/><line fill="none" stroke="#FFF212" stroke-width="3.94741" x1="3" y1="287" x2="571" y2="287"/><circle fill="none" stroke="#373435" stroke-width="5.92139" cx="287" cy="287" r="284"/></svg></center></div>', width: '56%' },{ region: 'east', collapsible: true, minSize: 75, // defaults to 50
maxSize: 220, frame: false, border: false, collapsed: true, collapseMode: 'mini', title: '%%%LABEL%%%TOOLBOX%%%', floatable: true, animFloat: false, autoHide: true, id: 'toolbox_%%%NODEID%%%', //unstyled: true,
margins: '5 0 0 5', //cmargins: '5 0 5 5',
width: 200, items:[{ xtype: 'spacer', height: 3 },{ xtype: 'button', id: 'cp_clear_btn_%%%NODEID%%%', width: '100%', disabled: true, text: '%%%LABEL%%%CLEALARM%%%', iconCls: 'ctrl_panel_clean_sm', iconAlign: 'left', handler: function(){ doDeviceOperation( 1, 125,'', true ); } },{ xtype: 'spacer', height: 3 },{ xtype: 'button', id: 'cp_draw_btn_%%%NODEID%%%', width: '100%', text: '%%%LABEL%%%DRABACKGROUND%%%', iconCls: 'ctrl_panel_drawscan_sm', iconAlign: 'left', disabled: true, handler: function(){ doDeviceOperation( %%%NODEID%%%, 3,'', true ); } },{ xtype: 'spacer', height: 3 },{ xtype: 'button', id: 'cp_study_btn_%%%NODEID%%%', width: '100%', text: '%%%LABEL%%%STUBACKGROUND%%%', iconCls: 'ctrl_panel_study_sm', iconAlign: 'left', disabled: true, handler: function(){ doDeviceOperation( %%%NODEID%%%, 2,'', true ); } },{ xtype: 'spacer', height: 3 },{ xtype: 'button', text: '%%%LABEL%%%MASKEDITOR%%%', id: 'DMED_%%%NODEID%%%', width: '100%', disabled: true, iconCls: 'ctrl_panel_drawscan_sm', handler: function(){ showMaskEditor( false, 0, %%%NODEID%%% ); } },{ xtype: 'spacer', height: 3 },{ xtype: 'panel', title: '%%%LABEL%%%MASKMNGR%%%', height: 70, frame: true, flex: 1, layout: 'hbox', items:[{ xtype: 'button', enableToggle: true, width: '20%', scale: 'medium',//scale: 'small',
id: 'mz_btn_%%%NODEID%%%_0', iconCls: 'mask_zone1_btn', iconAlign: 'top', pressed: false, disabled: true, handler: function(){ if( Ext.getCmp('mz_btn_%%%NODEID%%%_0').pressed){ doMaskOperation( %%%NODEID%%%, 1, 0 ); } else { doMaskOperation( %%%NODEID%%%, 0, 0 ); }; } },{ xtype: 'button', enableToggle: true, width: '20%', scale: 'medium', id: 'mz_btn_%%%NODEID%%%_1', iconCls: 'mask_zone2_btn', iconAlign: 'top', pressed: false, disabled: true, handler: function(){ if( Ext.getCmp('mz_btn_%%%NODEID%%%_1').pressed){ doMaskOperation( %%%NODEID%%%, 1, 1 ); } else { doMaskOperation( %%%NODEID%%%, 0, 1 ); }; } },{ xtype: 'button', enableToggle: true, width: '19%', scale: 'medium',//scale: 'large',
id: 'mz_btn_%%%NODEID%%%_2', iconCls: 'mask_zone3_btn', iconAlign: 'top', pressed: false, disabled: true, handler: function(){ if( Ext.getCmp('mz_btn_%%%NODEID%%%_2').pressed){ doMaskOperation( %%%NODEID%%%, 1, 2 ); } else { doMaskOperation( %%%NODEID%%%, 0, 2 ); }; } },{ xtype: 'button', enableToggle: true, width: '20%', scale: 'medium',//scale: 'large',
id: 'mz_btn_%%%NODEID%%%_3', iconCls: 'mask_zone4_btn', iconAlign: 'top', pressed: false, disabled: true, handler: function(){ if( Ext.getCmp('mz_btn_%%%NODEID%%%_3').pressed){ doMaskOperation( %%%NODEID%%%, 1, 3 ); } else { doMaskOperation( %%%NODEID%%%, 0, 3 ); }; } },{ xtype: 'button', enableToggle: true, width: '20%', scale: 'medium',//scale: 'large',
id: 'mz_btn_%%%NODEID%%%_4', iconCls: 'mask_zone5_btn', iconAlign: 'top', pressed: false, disabled: true, handler: function(){ if( Ext.getCmp('mz_btn_%%%NODEID%%%_4').pressed){ doMaskOperation( %%%NODEID%%%, 1, 4 ); } else { doMaskOperation( %%%NODEID%%%, 0, 4 ); }; } }] },{ xtype: 'spacer', height: 3 },{ xtype: 'button', width: '100%', enableToggle: true, id: 'cp_ack_btn_%%%NODEID%%%', text: '%%%LABEL%%%ACKNOLAGE%%%', iconCls: 'ctrl_panel_clean_sm', iconAlign: 'left', disabled: true, handler: function(){ if( Ext.getCmp('cp_ack_btn_%%%NODEID%%%').pressed){ //doMaskOperation( %%%NODEID%%%, 1, 4 );
doAckOperation( %%%NODEID%%%, 1 ); } else { //doMaskOperation( %%%NODEID%%%, 0, 4 );
doAckOperation( %%%NODEID%%%, 0 ); }; } }/*,{ xtype: 'panel', title: 'Detection Sensitivity', height: 95, frame: true, flex: 1, layout: 'hbox', items:[{ xtype: 'button', text: 'Factory', id: 'DDSPBTN0', width: 80, iconCls: 'detection_btn_factory', enableToggle: true, toggleGroup: 'det_sens_btn_grp', disabled: true, scale: 'large', iconAlign: 'top' },{ xtype: 'button', text: 'Low', id: 'DDSPBTN1', width: 80, iconCls: 'detection_btn_low', enableToggle: true, toggleGroup: 'det_sens_btn_grp', disabled: true, scale: 'large', iconAlign: 'top' },{ xtype: 'button', text: 'Meduim', id: 'DDSPBTN2', width: 80, iconCls: 'detection_btn_medium', enableToggle: true, toggleGroup: 'det_sens_btn_grp', disabled: true, scale: 'large', iconAlign: 'top' },{ xtype: 'button', text: 'High', id: 'DDSPBTN3', width: 80, iconCls: 'detection_btn_high', enableToggle: true, toggleGroup: 'det_sens_btn_grp', disabled: true, scale: 'large', iconAlign: 'top' }] }*/] }], bbar:[{ xtype: 'button', text: '12.5%', enableToggle: true, id: 'zoom_bt12_%%%NODEID%%%', toggleGroup: 'zoom_tg_%%%NODEID%%%', toggleHandler: function( bt, st ){ if( st ){ set2DZoomLevel( %%%NODEID%%%, 12 ); }; } },{ xtype: 'button', text: '25%', enableToggle: true, id: 'zoom_bt25_%%%NODEID%%%', toggleGroup: 'zoom_tg_%%%NODEID%%%', toggleHandler: function( bt, st ){ if( st ){ set2DZoomLevel( %%%NODEID%%%, 25 ); }; } },{ xtype: 'button', text: '50%', enableToggle: true, id: 'zoom_bt50_%%%NODEID%%%', toggleGroup: 'zoom_tg_%%%NODEID%%%', toggleHandler: function( bt, st ){ if( st ){ set2DZoomLevel( %%%NODEID%%%, 50 ); }; } },{ xtype: 'button', text: '100%', pressed: true, enableToggle: true, id: 'zoom_bt100_%%%NODEID%%%', toggleGroup: 'zoom_tg_%%%NODEID%%%', toggleHandler: function( bt, st ){ if( st ){ set2DZoomLevel( %%%NODEID%%%, 100 ); }; } },{ xtype: 'panel', id: 'status_%%%NODEID%%%', border: false, frame: false, width: 800, height: 28, html: '' }]}
|