From 6ead98595d71afba9d11d3300756b46f18fd6bda Mon Sep 17 00:00:00 2001 From: RblSb Date: Fri, 24 Jan 2025 08:42:34 +0300 Subject: Add server pause when leader disconnects --- src/client/Utils.hx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/client/Utils.hx') 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); -- cgit v1.2.3