Logic Machine Forum
hide/unhide slidebars - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Visualization (https://forum.logicmachine.net/forumdisplay.php?fid=9)
+--- Thread: hide/unhide slidebars (/showthread.php?tid=2097)



hide/unhide slidebars - ncgnick - 28.05.2019

Hello
I need to have a set of objects corresponding to virtual group addresses
Each object has to make a slide bar appearing on the screen so the user can select which light to dim and not to overload the visualization appearance with tens of slidebars . By pressing an object, all the other objects must be written with zero value (in order to show deselected mode) and all the slide bars must disappear except the intended one. Obviously I don't want to trigger an event from each individual address (thus writing hundreds  of scripts)

I have managed to control all the slidebars appearance from a single group address by using
.addClass("hide") and  .removeClass("hide") but only when i trigger an event from every individual virtual address. Also, I cannot manipulate a tag list from Java so I am doing it from a LUA script.
grp.tag('TAG_NAME'):update(event.getvalue())


Also, Is there any Java startup script to ensure that all the virtual objects are written with 0 and all the sliders are hidden at startup?
I can write 0 values with a LUA startup script but I cannot make the sliders to disappear
I can make the slidebars disappear and write 0 to all the virtual objects with JavaScript but cannot find a way to do it at start up although I have found a way to do it after the first selection of something (No matter what)


Thanks


RE: hide/unhide slidebars - admin - 28.05.2019

You probably don't need to use object values at all. You can remove default click handler from any element and attach your own.
Code:
$('.selector')
  .off('vclick')
  .on('vclick', function() { ... });