MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    JQuery Draggable and UI Touch Punch

    Scheduled Pinned Locked Moved Development
    4 Posts 2 Posters 3.1k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F Offline
      faxe1008
      last edited by

      Hi,

      I want to build a module in which the user is able to move the elements over screen by dragging them with touch. To realise that I implemented this: http://touchpunch.furf.com/. It works perfectly fine in the browser (localhost:8080) but in the actual MagicMirror window it does not work at all.

      Anyone know how to fix that?

      1 Reply Last reply Reply Quote 0
      • emloweE Offline
        emlowe Module Developer
        last edited by

        I don’t know, but electron seems to have some issues with touch

        • https://github.com/electron/electron/issues/8725
        • https://github.com/electron/electron/issues/8125
        • https://stackoverflow.com/questions/40359462/electron-enable-touch-events-for-a-touch-screen

        I was thinking of trying to use the ZingTouch JS library to see it could be used to add some touch support easily

        -Earle

        1 Reply Last reply Reply Quote 0
        • emloweE Offline
          emlowe Module Developer
          last edited by

          Also, you may find the hack of running node serveronly and then chrome in kiosk mode is ok for your use:

          node servonly
          and later start chromium in kiosk mode.

          chromium --noerrdialogs --kiosk 127.0.0.1:8080

          -Earle

          1 Reply Last reply Reply Quote 0
          • F Offline
            faxe1008
            last edited by faxe1008

            I would rather of course prefer it working out of the box, but if I can not get it to work I will try this.
            I looked at the github issues and they are talking about the --enable-touch-events parameter of electron. I have not worked with electron before - do you know where to put that parameter inside the electron.js file?

            Ok, I tried it like this:

            const app = electron.app;
            
            app.commandLine.appendSwitch('--enable-touch-events');
            
            

            It does not do anything. How would I need to modify the magic mirror scripts in order for it to stop using electron and use chromium instead? I assume I would have to modify the run-start.sh script for that, (since you can not run bash through javascript). Can someone provide me some help for that?

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • 1 / 1
            • First post
              Last post
            Enjoying MagicMirror? Please consider a donation!
            MagicMirror created by Michael Teeuw.
            Forum managed by Sam, technical setup by Karsten.
            This forum is using NodeBB as its core | Contributors
            Contact | Privacy Policy