You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
75 lines
4.2 KiB
75 lines
4.2 KiB
{
|
|
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_svgr_'+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;
|
|
|
|
var W = p.getWidth();
|
|
//var H = PanelH - p.ownerCt.ownerCt.getHeight() + 64;
|
|
var H = 9*(W/16) - 28;
|
|
if( %%%APPTYPE%%% == 2 ){
|
|
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();
|
|
if( H > W+60 ){
|
|
H = W+60;
|
|
};
|
|
};
|
|
//var 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_svgr_%%%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_svgr_'+fsDrawID );
|
|
el.removeAttribute("width");
|
|
el.setAttribute( "width", H-80 );//'86%' );
|
|
fsDrawID = 0;
|
|
};
|
|
};
|
|
});
|
|
window.setTimeout( load2DDraw, 10*%%%NODEID%%%, %%%NODEID%%%, 'draw_svgr_' );
|
|
}
|
|
},
|
|
layout: 'hbox',
|
|
items:[{
|
|
id: 'cp_radar_%%%NODEID%%%',
|
|
html: '<div id="div_radar_%%%NODEID%%%" style="display: block; padding: 5px; width: \'100%\'; height: \'100%\';"><center><svg id="draw_svgr_%%%NODEID%%%" opacity="1.0" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="100%" version="1.1" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd;" viewBox="0 0 574 574" xmlns:xlink="http://www.w3.org/1999/xlink"><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: '100%'
|
|
}]
|
|
}
|