Browse Source

JAJAUZE

master
Evgeny Gagua 3 years ago
parent
commit
e0cd1f1f70
  1. 2
      lib/controller/getDeviceMask.php
  2. 64
      lib/javascript/jsapi_dynamic/mojo_dashboard.js
  3. 50
      lib/javascript/jsapi_dynamic/rgoose_devices.js

2
lib/controller/getDeviceMask.php

@ -17,7 +17,7 @@
$result = $DATABASE->Query( $QS, false );
if( count($result) ){
$CM = $result[0];
$QS = "SELECT * FROM `lrf_mask_vertexes` WHERE `mask_id`={$CM['id']}";
$QS = "SELECT `id` FROM `lrf_mask_vertexes` WHERE `mask_id`={$CM['id']}";
$ZA = $DATABASE->Query( $QS );
$CMA['vtx'] = array();
if( count( $ZA ) ){

64
lib/javascript/jsapi_dynamic/mojo_dashboard.js

@ -868,7 +868,7 @@ function draw2DMasks( a, zzz='' ){
newpath.setAttributeNS(null, "fill-opacity", "1.0");
};
newpath.setAttributeNS(null, "id", "mask_"+a+"_"+i+"_"+k );
console.log( "Added Poly: mask_"+a+"_"+i+"_"+k );
//console.log( "Added Poly: mask_"+a+"_"+i+"_"+k );
newpath.setAttributeNS(null, "clip-path", "url(#svg_mask_"+a+")" );
var tch = csvg.getElementById( "border_"+a );
if( tch != undefined ){
@ -997,6 +997,8 @@ function load2DDraw( a, id='' ){
draws_2d[a] = data.data;
draw2DDraw( a, id );
load2DMasks( a, id );
} else {
load2DMasks( a, id );
};
},
failure: failureAJAXFunction
@ -1891,6 +1893,66 @@ function finishAdd2DACK(){
};
};
function cancelAdd2DACK(){
if( mode_add_ack ){
mode_add_ack = false;
};
};
function clear2DACK( a ){
};
function doAckOperation( NodeID, Cmd ){
if( Cmd ){
Ext.Msg.show({
title:'<?=$Labels->GetLabel("_INFO_MSG_");?>',
msg: '<?=$Labels->GetLabel("_DEV_ACK_START_");?>',
buttons: Ext.Msg.YESNOCANCEL,
fn: function( btn ){
if( btn == 'yes' ){
selectROI_mode = 1;
t = Ext.getCmp('cp_radar_'+NodeID );
if( t != undefined ){
t.addClass( 'yellow_bg' );
};
t = Ext.getCmp('toolbox_'+NodeID );
if( t != undefined ){
W = t.ownerCt.ownerCt.getWidth();
H = t.ownerCt.ownerCt.getHeight();
if( H ){
if( ( W / H ) < 1.5 ) t.collapse( true );
};
};
t = document.getElementById('draw_svg_'+NodeID );
if( t != undefined ){
t.style.cursor = 'cell';
};
} else {
t = Ext.getCmp('cp_ack_btn_'+NodeID );
if( t != undefined ) t.toggle( false, true );
};
},
icon: Ext.MessageBox.QUESTION
});
} else {
if( mode_add_ack ){
} else {
Ext.Msg.show({
title:'<?=$Labels->GetLabel("_INFO_MSG_");?>',
msg: '<?=$Labels->GetLabel("_DEV_ACK_STOP_");?>',
buttons: Ext.Msg.YESNOCANCEL,
fn: function( btn ){
if( btn == 'yes' ){
doMaskOperation( NodeID, 3, 5 );
} else {
t = Ext.getCmp('cp_ack_btn_'+NodeID );
if( t != undefined ) t.toggle( true, true );
};
},
icon: Ext.MessageBox.QUESTION
});
};
};
};

50
lib/javascript/jsapi_dynamic/rgoose_devices.js

@ -2009,56 +2009,6 @@ function doMaskOperation( NodeID, Cmd, Mid = 0, LRFID = 0 ){
});
}
function doAckOperation( NodeID, Cmd ){
if( Cmd ){
Ext.Msg.show({
title:'<?=$Labels->GetLabel("_INFO_MSG_");?>',
msg: '<?=$Labels->GetLabel("_DEV_ACK_START_");?>',
buttons: Ext.Msg.YESNOCANCEL,
fn: function( btn ){
if( btn == 'yes' ){
selectROI_mode = 1;
t = Ext.getCmp('cp_radar_'+NodeID );
if( t != undefined ){
t.addClass( 'yellow_bg' );
};
t = Ext.getCmp('toolbox_'+NodeID );
if( t != undefined ){
W = t.ownerCt.ownerCt.getWidth();
H = t.ownerCt.ownerCt.getHeight();
if( H ){
if( ( W / H ) < 1.5 ) t.collapse( true );
};
};
t = document.getElementById('draw_svg_'+NodeID );
if( t != undefined ){
t.style.cursor = 'cell';
};
} else {
t = Ext.getCmp('cp_ack_btn_'+NodeID );
if( t != undefined ) t.toggle( false, true );
};
},
icon: Ext.MessageBox.QUESTION
});
} else {
Ext.Msg.show({
title:'<?=$Labels->GetLabel("_INFO_MSG_");?>',
msg: '<?=$Labels->GetLabel("_DEV_ACK_STOP_");?>',
buttons: Ext.Msg.YESNOCANCEL,
fn: function( btn ){
if( btn == 'yes' ){
doMaskOperation( NodeID, 3, 5 );
} else {
t = Ext.getCmp('cp_ack_btn_'+NodeID );
if( t != undefined ) t.toggle( true, true );
};
},
icon: Ext.MessageBox.QUESTION
});
};
}
var ME_max_range = 100;
function showMaskEditor( fromDevTool, DevType, NodeID ){
//alert( "DevType: "+DevType + " Dev Map size: "+ absDrawMapSizes[DevType][0]+"x"+absDrawMapSizes[DevType][1] );

Loading…
Cancel
Save