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.hx9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/client/Utils.hx b/src/client/Utils.hx
index 37de672..69671d2 100644
--- a/src/client/Utils.hx
+++ b/src/client/Utils.hx
@@ -16,6 +16,15 @@ class Utils {
else parent.insertBefore(child, parent.children[i]);
}
+ public static function getIndex(parent:Element, child:Element):Int {
+ var i = 0;
+ for (el in parent.children) {
+ if (el == child) break;
+ i++;
+ }
+ return i;
+ }
+
public static function toggleFullScreen(el:Element):Bool {
var state = true;
final doc:Dynamic = document;
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage