MagicMirror² v2.13.0 is available! For more information about this release, check out this topic.

Determining module content dimensions before returning wrapper

  • Module Developer

    I gave a forum search but couldn’t find much on this.

    When building the HTML content wrapper to return via updateDom, is there a way to check the sizes of a given element or the module contents as a whole?

    I’ve checked using clientWidth/clientHeight and offsetWidth/offsetHeight but they always return zero I guess because nothing is actually rendered yet.

    My desire is to dynamically fill in all available vertical space on left or right side of the screen without having text overflow into a module above or below it. The width of the module in this case would be a fixed size.

Log in to reply