Skip to main content
13-Aquamarine
June 29, 2023
Question

3D panel button sequence

  • June 29, 2023
  • 1 reply
  • 2583 views

In 3D panel I have placed some buttons, checkbox and labels in order. the button should play on sequence,

if i click the first button then show the check box, label and 2nd button, similarly if i click the 2nd button the  2nd checkbox, label and 3rd button should appear and so on. How to do this sequence using js.

 

 

1 reply

21-Topaz I
June 30, 2023

Hi @Rakesh_kumar_S ,

so far I understand- you want to display 3 elements which should follow the enviroment of the current selected number - so if 1,2,3 but when 9 selected then 8,9,10 . Because, to implement scrolling will be difficult in 3D (using 3D widgets) , so I think  the best approach could be to display only few elements e.g. the 3 elements as already you displayed in the pictures and to update them. So means to rename the names according to the current selected context (only with javascript) And then the call of the button click  should be something with use js switch construct -where the name (updated on runtime) is pass to select the correct option which should be run.

21-Topaz I
June 30, 2023

so I want to provide an example to the pervious post- the idea what I meant th2023-06-30_12-45-33.jpg

So you can change (some fake of scrolling) the names of the items . There a goDown and goUP button and also the data is coming form Upload folder - json file. Here in example something like this

[
{"step":1,"description":"descr step 1","checked":true,"info":"some Info Step 1"},
{"step":2,"description":"descr step 2","checked":true,"info":"some Info Step 2"},
{"step":3,"description":"descr step 3","checked":false,"info":"some Info Step 3"},
{"step":4,"description":"descr step 4","checked":true,"info":"some Info Step 4"},
{"step":5,"description":"descr step 5","checked":false,"info":"some Info Step 5"},
{"step":6,"description":"descr step 6","checked":false,"info":"some Info Step 6"},
{"step":7,"description":"descr step 7","checked":true,"info":"some Info Step 7"},
{"step":8,"description":"descr step 8","checked":true,"info":"some Info Step 8"},
{"step":9,"description":"descr step 9","checked":false,"info":"some Info Step 9"},
{"step":10,"description":"descr step 10","checked":false,"info":"some Info Step 10"},
{"step":11,"description":"descr step 11","checked":false,"info":"some Info Step 11"},
{"step":12,"description":"descr step 12","checked":true,"info":"some Info Step 12"}
]

When a button is click it will check the current text - here will extract the number from there e.g.

2023-06-30_12-54-47.jpg

where the function e.g.:

//----------------------------------------------------------------------------------------
$scope.app.doStepFromName=function(featName){
 let Name = $scope.app.view.Home.wdg[featName].text
 console.log("widget clicked::"+ Name);
 let num= Name.split('::')[1]
 msg_txt="So some action for Number "+num+" is doen here !"
 console.warn(msg_txt);
 var msg = new SpeechSynthesisUtterance(msg_txt);
 window.speechSynthesis.speak(msg);
}

  

13-Aquamarine
July 3, 2023

Thaks for your reply, but i need different kind of solution, my question was,

if i clicked 1st button then show the 1st check box, 1st label & 2nd button similarly if i click the 2nd button then show the 2nd check box, 2nd label  & 3rd button. like these i want.