aboutsummaryrefslogtreecommitdiffstats
path: root/src/client/Utils.hx
diff options
context:
space:
mode:
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