123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- function OnInitializeData(reload, preview) {
-
- PUI(()=>{
-
-
-
-
- });
- }
- function OnReady(reload, preview) {
-
- PUI(()=>{
-
-
-
-
- });
- }
- function OnCloseForm() {
- }
- function OnException(err) {
-
- }
- function OnReturn(){
- unit.form.mainfrm.menu(0);
- }
- var i = 0;
- function OnSendPoint(){
- let workcondition_index = model.acax_app.view.GetCurrentWorkConditionIndex();
- let temp = unit.form.tree.GetCurUniqueName();
- let name = temp;
-
- let j = 0;
- let i = 0;
- if(model.acax_app.view.GetProperty(workcondition_index) === undefined || model.acax_app.view.GetProperty(workcondition_index).point === undefined) {
- name = name + " P 0 0";
- }else{
- let point_arr = Object.keys(model.acax_app.view.GetProperty(workcondition_index).point);
- name = name + " P 0 " + point_arr.length;
- while(1){
- for( i = 0;i < point_arr.length;++i) {
- if(model.acax_app.view.GetProperty(workcondition_index).point[point_arr[i]].name === name) {
- ++j;
- name = temp + " P 0 " + point_arr.length + j;
-
- break;
- }
- }
- if(i === point_arr.length) {
- break;
- }
- }
-
- }
- unit.form.mainfrm.OnSetPoints(ui.pb_x.value, ui.pb_y.value, ui.pb_z.value, ui.pb_radius.value, name);
- ++i;
- let node ={
- "x":ui.pb_x.value,
- "y":ui.pb_y.value,
- "z":ui.pb_z.value,
- "radius":ui.pb_radius.value,
- "name":name
- };
-
- unit.form.tree.SetPoint(node);
-
- }
- function OnParentDockerMessage(type, para) {
- }
- function onDragFile(filepath) {
- }
- function PUI(cb) {
- if(pui){cb();}
- }
- function BLOCK_EVENT(cb) {
- ui.block_event = true;
-
- cb();
-
- ui.block_event = false;
- }
- function CW_DeclareVariable(name, setter, getter) {
- if(typeof(__DeclareVariable) === 'function') {
- __DeclareVariable(name, setter, getter);
- }
- }
- function CW_DeclareOuterVariable(name) {
- if(typeof(__DeclareOuterVariable) === 'function') {
- __DeclareOuterVariable(name);
- }
- }
|