Logic Machine Forum
Widgets with variable items - 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: Widgets with variable items (/showthread.php?tid=2848)



Widgets with variable items - buuuudzik - 17.09.2020

Is is possible now to add to widget possibility to add variable number of items? E.g. elevator widget should have possibility to add variable number of floors. Same with some multiple light controller. I know that e.g. I can prepare e.g. 10 empty static fields but it is not the best solution. So please consider adding some mechanism to Mosaic for support such function.


RE: Widgets with variable items - Daniel - 17.09.2020

Have you seen the Switch widget in Additional ?


RE: Widgets with variable items - buuuudzik - 17.09.2020

(17.09.2020, 09:49)Daniel. Wrote: Have you seen the Switch widget in Additional ?

Nice to hear such thing? I dont remember if I used it. But can you share code how to do this? How dynamically add properties to controller and view?


RE: Widgets with variable items - Daniel - 17.09.2020

JS for this widget


RE: Widgets with variable items - buuuudzik - 17.09.2020

Thanks, but I mean dynamically so at start there is 1 empty element and plus icon on form then it is really dynamically. The way from script has unnecessary static properties in form which I want to not see.