Manuals/App Creator/Getting Started
Improve your App (2)
Edit the Dataflow diagram
We begin to clean up the diagram. Click on the button Default view (Show all) then select the leftmost node and with the popup menu, launch the command 'Auto arrange'.
We want first to display the state of the LED. We need to add an Inline code (unary function) just after the Value extractor of the ledstatus variable:
The JavaScript contents of the Inline code node is quite simple:
return ( input != 0) ? "ON" : "OFF";
Then we associate the output of this node to the input value of the graphical component. It can be done either from the Dataflow diagram (see below) or from the UI Editor:
and we duplicate this node in order to also adapt the color: