diff options
| author | RblSb <msrblsb@gmail.com> | 2025-01-24 08:42:34 +0300 |
|---|---|---|
| committer | RblSb <msrblsb@gmail.com> | 2025-01-24 19:37:02 +0300 |
| commit | 6ead98595d71afba9d11d3300756b46f18fd6bda (patch) | |
| tree | d087094f9a124a31adad290a5040a8f7d4902186 /src/client/Utils.hx | |
| parent | a843ae530b07b92fc7341754b4722cdcb8dfb831 (diff) | |
Add server pause when leader disconnects
Diffstat (limited to 'src/client/Utils.hx')
| -rw-r--r-- | src/client/Utils.hx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/client/Utils.hx b/src/client/Utils.hx index 155292f..717d64f 100644 --- a/src/client/Utils.hx +++ b/src/client/Utils.hx @@ -47,6 +47,13 @@ class Utils { return wrapper.firstElementChild; } + public static function outerHeight(el:Element):Float { + final style = window.getComputedStyle(el); + return (el.getBoundingClientRect().height + + Std.parseFloat(style.marginTop) + + Std.parseFloat(style.marginBottom)); + } + public static function prepend(parent:Element, child:Element):Void { if (parent.firstChild == null) parent.appendChild(child); else parent.insertBefore(child, parent.firstChild); |
