aboutsummaryrefslogtreecommitdiffstats
path: root/src/client/Utils.hx
diff options
context:
space:
mode:
authorRblSb <msrblsb@gmail.com>2025-01-24 08:42:34 +0300
committerRblSb <msrblsb@gmail.com>2025-01-24 19:37:02 +0300
commit6ead98595d71afba9d11d3300756b46f18fd6bda (patch)
treed087094f9a124a31adad290a5040a8f7d4902186 /src/client/Utils.hx
parenta843ae530b07b92fc7341754b4722cdcb8dfb831 (diff)
Add server pause when leader disconnects
Diffstat (limited to 'src/client/Utils.hx')
-rw-r--r--src/client/Utils.hx7
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);
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage