summaryrefslogtreecommitdiff
path: root/assets/js/core/utils.js
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2017-01-02 17:01:27 -0500
committerFrederic Guillot <fred@kanboard.net>2017-01-02 17:01:27 -0500
commit3833c12ccce59bcc49c4cfa892401973558f604d (patch)
treeb67b0e10cdc3d42e5626f728206138a444a40ed0 /assets/js/core/utils.js
parentd49ce63e51f596ad3bf0d02b689aea673cf544f8 (diff)
Refactoring/rewrite of modal boxes handling
Diffstat (limited to 'assets/js/core/utils.js')
-rw-r--r--assets/js/core/utils.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/assets/js/core/utils.js b/assets/js/core/utils.js
index 4d0f8847..a3683122 100644
--- a/assets/js/core/utils.js
+++ b/assets/js/core/utils.js
@@ -87,3 +87,10 @@ KB.utils.getKey = function (e) {
return e.key;
};
+
+KB.utils.getViewportSize = function () {
+ return {
+ width: Math.max(document.documentElement.clientWidth, window.innerWidth || 0),
+ height: Math.max(document.documentElement.clientHeight, window.innerHeight || 0)
+ };
+};