• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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 Dec 29, 2017, 1:23 PM

    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

    B 1 Reply Last reply Dec 29, 2017, 3:42 PM Reply Quote 0
    • B Offline
      broberg Project Sponsor @russifer
      last edited by Dec 29, 2017, 3:42 PM

      @russifer remove animation then?

      R 1 Reply Last reply Dec 29, 2017, 3:54 PM Reply Quote 0
      • R Offline
        russifer @broberg
        last edited by Dec 29, 2017, 3:54 PM

        @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.

        S 1 Reply Last reply Dec 30, 2017, 12:01 AM Reply Quote 0
        • S Offline
          strawberry 3.141 Project Sponsor Module Developer @russifer
          last edited by Dec 30, 2017, 12:01 AM

          @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
          1 / 1
          • First post
            2/4
            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