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.

    updateDom animationSpeed

    Scheduled Pinned Locked Moved Troubleshooting
    4 Posts 3 Posters 2.0k Views 2 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.
    • R Offline
      russifer
      last edited by

      Hello - I’m developing my first module and when I want to update the dom, I call the following methods:

      this.updateDom(animationSpeed);
      this.scheduleUpdate();
      

      If I set the animationSpeed to something like 3 seconds, the text I added to the dom fades to nothing, which is not what I want. I want the text to stay persisted on the screen. If I set it to 0, the changes don’t show up at all. If I set it to a really really large value, the text does stay, but it seems to overload my processor’s CPU. How do I use the updateDom method to persist text on the screen? Thanks so much.

      -Russ

      brobergB 1 Reply Last reply Reply Quote 0
      • brobergB Offline
        broberg Project Sponsor @russifer
        last edited by

        @russifer remove animation then?

        R 1 Reply Last reply Reply Quote 0
        • R Offline
          russifer @broberg
          last edited by

          @broberg I did remove the animation speed value, so instead didn’t pass anything into updateDom, but that causes the updates not to occur at all. The new text never appears on screen.

          strawberry 3.141S 1 Reply Last reply Reply Quote 0
          • strawberry 3.141S Offline
            strawberry 3.141 Project Sponsor Module Developer @russifer
            last edited by

            @russifer you might want to post or link your whole module, that makes debugging for others easier to find your mistake

            Please create a github issue if you need help, so I can keep track

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