Read the statement by Michael Teeuw here.
Module Position
-
I can see that you are still refering to targetRegion, but it’s nowhere defined.
const region = document.querySelector(`div.region.${targetRegion} div.container`);
modulename.hide()
can’t work, in your case modulename is just a string and a string doesn’t have a hide function, what you want instead is calling the hide function of the module instance, which would be in your case something like:MM.getModules().enumerate((module) => { if (module.name === modulename) { module.hide(); } });
There are more things to do, but what I spotted shouldn’t break anything.
-
-
yes already saw that yesterday forgot to replace it ;)
-
yes decided to do some majopr changes to improve it (hope to finish them today)
-
I am new to javascript why I asked because I don’t need to learn the stuff in a wrong way from start off. So any tips on improving the code that are a general thing so that I should think off when doing other stuff with javascript I am really interested in
-
-
This version of the MMM-Carousel module can move modules to different position on different “slides” – the slides can be changed automatically (interval based) or manually (keyboard/navigation buttons) or via Socket Notifications.
See the very bottom of the README file for how to set it up in your config.
-
@shbatm looks nice ;) I might use this slide indicator for my module, thats a really nice idea
-
@maxbachmann If you create a github repo, than I can make suggestions what you could improve
-
@strawberry-3-141 I will when I finished, but have to do some other stuff for the speech recognition first. Will let you know when I posted it on github
-
@maxbachmann you dont need to wait until its finished, git is a version control, so it should be used as early as possible.
-
@strawberry-3-141 yes but I will probably use the voice control in a different way than I hought I would. Thats why I am not sure how I will change the code. Makes not much sence to waste your time on correcting the faults when I change pretty much every part of the program again right afterwards (and have to get used to git since I did not use it yet)