Read the statement by Michael Teeuw here.
Need help MMM-touch MMM-pages MMM-page indicator
-
@MMRIZE, thank you for catching those gesture name errors and giving my another example. I FINALLY GOT IT :)
{ module: "MMM-Touch", position: "bottom_bar", disabled: false, config: { debug: false, useDisplay: false, autoMode: false, defaultMode: "default", gestureCommands: { "default":{ "TAP_1": (commander) => {commander.sendNotification("USER_PRESENCE", true);}, "SWIPE_LEFT_1": (commander) => {commander.sendNotification("PAGE_DECREMENT", null);}, "SWIPE_RIGHT_1": (commander) => {commander.sendNotification("PAGE_INCREMENT", null);}, }, }, } },
I tried to change things systematically to determine what truly made it start working was the addition of payload after “USER_PRESENCE” and oddly enough adding semicolons at the end of each gesture command.
Hopefully this thread can help someone else down the line :)
-
@CurlyQ12391 @MMRIZE, I followed this thread to enable the swipe left and right to change pages but I’ve run into an issue that this only works when I have the dev console open, either using npm start dev or npm run start followed by ctrl+shift+i. Do you have any ideas why it would only work when the dev console is open?
-
@tburk32 no. the code doesn’t know
-
@tburk32 also, before 2.30
you could do
npm start dev
on 2.30, because of the different ui engine choices
npm run start:dev
-
@sdetweil I agree, but it isn’t the way it’s acting. When I have it in the dev console, a grey circle also appears on the screen as a cursor and I’m wondering if that is part of the difference.
-
@tburk32 maybe the dev console gives you access under the z-index for touch
-
@sdetweil I removed all of the other modules in my config.js file and experienced the same results. To go one step further with the z-index exploration, I added this to the custom.css.
.MMM-Touch (position: absolute; z-index -1)
Additionally, while having the dev console open, clicks with a mouse also register on MMM-Touch, so I it doesn’t seem like it’s unique to the display/touch function.
I really appreciate your responses so far.
-
@tburk32 you have an error there
css has
name : value ;
your z-index is missing both : and ;
and -1 means background, down/further away , in the 3d stack
so that puts other content on top of it, so touch wont work -
@sdetweil thanks for pointing out the -1 index, I saw it as a resolution on another topic and figured I’d try. No values in the z-index seem to make a difference.
While in devtools, I selected “restore defaults and reload” and the MMM-Touch inputs were no longer recognized, which aligns with the expectation that “the code doesn’t know”. This helped me realize that the Device toolbar (ctrl+shift+M) has to be displayed for the inputs to be recognized again, either with a touch or a click.
-
@tburk32 did you enable touch events in custom.css
cause they are disabled by default in main.css
main.csshtml { cursor: none; }
custom.css
html { cursor: default; }