diff options
| author | RblSb <msrblsb@gmail.com> | 2020-02-28 10:40:53 +0300 |
|---|---|---|
| committer | RblSb <msrblsb@gmail.com> | 2020-02-28 10:40:53 +0300 |
| commit | c5903d5670dad72c840c30a302f8238c8cff9f8a (patch) | |
| tree | 212eae2d7638e7393121ae2c79a4ba68846a64ec /src/client/Utils.hx | |
| parent | 8c739fa43946ba8cc5bc6c6226032154b9481a40 (diff) | |
Implement video item buttons
Diffstat (limited to 'src/client/Utils.hx')
| -rw-r--r-- | src/client/Utils.hx | 9 |
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; |
