Read the statement by Michael Teeuw here.
MMM-Touch
-
can someone provide me with an example of Executing methods of module?
i’d like to create a swipe up and swipe down to hide and unhide a module. thank you.
-
@3squaremirror can u be more specific, execute methods of a module?
-
@3squaremirror
I have not tested yet, but you can get a concept. (I’ll assume you are using default configuration and mode)gestureCommands: { "default": { "SWIPE_UP_1" : (commander) => { commander.getModules().forEach((m) => {m.show()}) }, "SWIPE_DOWN_1" : (commander) => { commander.getModules().forEach((m) => {m.hide()}) } } },
Swiping up with one finger would reveal modules.
Swiping down with one finger would hide modules.
But in the real world, some modules are protected with lock string from hiding/showing, -
@MMRIZE I saw that in the example in the GitHub page. I’m confused on where to specify which module to hide/show. Thanks.
-
@sdetweil to hide and show a specific module.
-
@3squaremirror i understood that part…
I think @MMRIZE answered
-
@sdetweil I’m not clear on where to specify the module I want to hide/show. Can you help me understand? Thank you.
-
@3squaremirror i believe @MMRIZE provided code to hide all, and you could have a list (or only one) module name to match for hiding/showing
-
"SWIPE_UP_1" : (commander) => { let clock = commander.getModule('clock') clock.hide() },
https://github.com/gfischershaw/MMM-Touch/wiki/Manual#command
-
@MMRIZE THANK YOU! much appreciated.