MMM-page-indicator
MMM-page-indicator copied to clipboard
Indicator loses order
Hi, I use MMM-pages together with MMM-page-indicator. For changing the pages i use MMM-GroveGesture. MMM-GroveGestures allows me to swipe pages forth and back. The gestures are detected by a small gesture sensor which is also used by the module author (https://github.com/eouia/MMM-GroveGestures). All 3 modules worked fine together. Around the release of MM v2.14 (I can't say for sure) the indcator gest out of sync with the order of the displayed pages.
E.g.: When MM is started or wakes up from sleep, the indicator is on the first position and displays page0 (which is correct). When I swipe to the next page (page1), then page1 is displayed, but the indicator overjumps the second position and displays the 3rd (which would be page2). The further I swipe the more confused gets the indicator and shows always the wrong position. When the mirror goes to sleep and wakes up gain, then the indicator is again on the 1st position and the home page (page0) is displayed. As said before the combo worked flawlessly together, but somehow it changed.
Just as a sanity check, are you using an up-to-date version? There was a bug a while ago that was fixed and also caused loss of order.
Yes, I use the latest version.
Alright, thanks for confirming. Can you post the chrome devtool console logs? I'm wondering if it's receiving multiple page change events.
Unfortunatelly I just can access the mirror via VNC. Thus I made a screen shot of the console. There seems to be a double event, as you guessed:
Interesting. I've made a quick push to MMM-page-indicator to have more descriptive logging. Can you try what you're doing again, after pulling?
Here is the screenshot with more descriptive logging, filtered on MMM-page-indicator:
Thanks. It's a little strange to see this happen only with you. Do you mind uploading your entire config.js
, with any personal information removed?
I suspect that you're declaring MMM-page-indicator
first and that's why it's causing this issue, but this shouldn't happen even if you did.
Here is my config.js
file. The MMM-page-indicator
is on the very end of the config. I put it also for testing right after MMM-pages
, but it still didn't work.
Thanks.
I'll try my best to take a look at this soon, but as I'm moving starting tomorrow it might take a while to get back to you.
If you want to try a quick fix you can remove these lines from the code and it should work—let me know if it does.
I'll need to figure out a way to do this without breaking compatibility for everyone though.
Hi, thanks for the quick fix! It does work! It is actually interesting, because you delete the query for the increment/decrement, notification which is sent from the gesture sensor module and it now works correctly...Anyways, thanks for your support, and I hope you can figure out how to fix that without breaking compatibility.
Hi Edward, just fyi I have the exact same issue on mine.
@edward-shen Today i upgraded my MagicMirror install to 2.17 and had the same issue. Deleting/uncomment the lines you suggested works for me. Regards AxLED