diff options
author | Zachary Zhang <zacharyzhang7@gmail.com> | 2024-03-12 16:30:43 -0400 |
---|---|---|
committer | Zachary Zhang <zacharyzhang7@gmail.com> | 2024-03-12 16:30:43 -0400 |
commit | 2edfef5ac0e394cdbb8687cd3f325ff994722ef2 (patch) | |
tree | cc8209830a7f51ea0014e88a171dd36c1b9da0b3 /src/Utils.ts | |
parent | 84e75f944a45c3b98ec70c75d2abc47051b10b03 (diff) | |
parent | 08c9a1fa70bcacc7dcbe103eca6209a96f00967c (diff) |
Merge branch 'zach-starter' of https://github.com/brown-dash/Dash-Web 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 |