diff options
author | bobzel <zzzman@gmail.com> | 2024-03-10 09:50:46 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2024-03-10 09:50:46 -0400 |
commit | 4caca5b32f74beed00bfbdaa181cb69fc001b7ca (patch) | |
tree | 5601b1bdaa8499af44d2ca50dd845ea0a65128b4 /src/Utils.ts | |
parent | 3735fd5e8c0f5315d73a28ef59dcff4bc6158c88 (diff) | |
parent | a9eb266296d1b71f1016c867f39e20299c011eea (diff) |
Merge branch 'master' into zach-starter
Diffstat (limited to 'src/Utils.ts')
-rw-r--r-- | src/Utils.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Utils.ts b/src/Utils.ts index e8bd35ac4..38325a463 100644 --- a/src/Utils.ts +++ b/src/Utils.ts @@ -902,6 +902,13 @@ export function setupMoveUpEvents( document.addEventListener('click', _clickEvent, true); } +export function DivHeight(ele: HTMLElement): number { + return Number(getComputedStyle(ele).height.replace('px', '')); +} +export function DivWidth(ele: HTMLElement): number { + return Number(getComputedStyle(ele).width.replace('px', '')); +} + export function dateRangeStrToDates(dateStr: string) { // dateStr in yyyy-mm-dd format const dateRangeParts = dateStr.split('|'); // splits into from and to date |