开云体育

"Hide and Show" attribute for icons is not working on web panels #logixng #webserver


 

I only recently discovered the LogixNG component of JMRI.? I found out about the "Id" attribute that can be associated with an an icon (or any item I guess).? I found that this was implemented because that was needed for LogixNG to be able to reference items to hide, show, enable and disable them, among other things I guess.? I don't know why I would need to disable or enable an icon but I was happy to find I could hide and show icons.? By stacking them and writing some LogixNG items I was able to produce some visual effects that weren't possible before.
?
Quite by accident, today I came across a post that said that if you disable an icon, that behavior does not appear on web panels.? I've confirmed that this issue also occurs when you use the hide or show features.? Well, it kinda works.? If you hide or show an icon, the icon's visibility will not change on the web panel unless you click refresh on your browser.?
?
I guess I have to give up on my nice visual effects because I will use JMRI's web server to display my panels so I can use my tablet device to? control my layout.? I'm not sure how useful the hide/show feature is if it doesn't work when using the web server.??
?
Please tell me I'm missing something.


 

Hi Bob,
You are correct with regard to the /panel server. It updates individual elements using the json server, which sends "state" info, not "drawing" info (size, position, color, visibility, etc.)
However, you may be able to use the /frame server as a workaround. It sends periodic "screenshots" of the entire panel, so "drawing" changes are included.
You'll need to enable panel server in Preferences, and then use the /frame URL syntax instead of /panel.
--SteveT?


 

Bob.?
?
A rather trivial footnote to your main issue, but in response to your remark, "I don't know why I would need to disable or enable an icon..." our club displays the state of occupancy sensors and of signal masts on the Control Panel Editor panels.? We do not want members accidentally changing those states from their smartphones or tablets.
?
The ability to dynamically disable and enable a Turnout or a fastclock might be useful on some layouts, but we have not investigated either of those options.
?
Cliff in Baja SoCal
?
?