From c5903d5670dad72c840c30a302f8238c8cff9f8a Mon Sep 17 00:00:00 2001 From: RblSb Date: Fri, 28 Feb 2020 10:40:53 +0300 Subject: Implement video item buttons --- src/client/Utils.hx | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/client/Utils.hx') 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; -- cgit v1.2.3