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.

    Touch input examples for MM Module

    Scheduled Pinned Locked Moved Development
    18 Posts 5 Posters 4.0k Views 5 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.
    • S Offline
      sdetweil @jcleary05
      last edited by

      @jcleary05 the module is contributing a small section of html, ONLY its content… the overall page is managed by MM…

      the getDom() method returns the small dom tree to inject into the page… in the position element of the page…

      see my sample module https://github.com/sdetweil/SampleModule

      if u look at ~/MagicMirror/index.html, you will see the page layout

      each module is placed into one of those regions.

      if you use the developers window (ctrl-shift-i) and select the elements tab. you can see the modules output in place

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 1
      • D Offline
        delrein
        last edited by

        This post is deleted!
        1 Reply Last reply Reply Quote 0
        • J Offline
          jcleary05
          last edited by

          @sdetweil
          Thanks for all your help so far!
          I am currently trying to build a step by step form, which the user will interact with to answer a number of questions.
          Would it be possible to run each element of this form as separate functions called by the getDom function?

          Also, to make things easier, would it be possible to call in a piece of html into the js file to work with, instead of having to build the entire form using the createElement functions?

          The example I am currently trying to build is similar to this:
          https://www.w3schools.com/howto/howto_js_form_steps.asp

          S 2 Replies Last reply Reply Quote 0
          • S Offline
            sdetweil @jcleary05
            last edited by

            @jcleary05 sure, u can add a text html string into the innerHTML of an element like a div

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • S Offline
              sdetweil @jcleary05
              last edited by

              @jcleary05 run each button press as separate. Sure.

              They don’t have to be online in getDom(). They just have to be linked to the button onClick

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • D Offline
                dvbit
                last edited by

                Some future direction and option

                https://github.com/dvbit/Kinect-Mouse-Swipe-C-Module

                Not touch but gestures

                1 Reply Last reply Reply Quote 0
                • 1
                • 2
                • 1 / 2
                • 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