diff options
author | eleanor-park <eleanor_park@brown.edu> | 2024-04-14 14:27:43 -0400 |
---|---|---|
committer | eleanor-park <eleanor_park@brown.edu> | 2024-04-14 14:27:43 -0400 |
commit | 15e40cd865474f524c8e35f9352fc40d4b515ab3 (patch) | |
tree | 4ba71fafec248b22226157908b9fb578e4529df6 /src/Utils.ts | |
parent | d938cd08650279f5c7894793d5fd78ec4068694c (diff) | |
parent | 36d18da80e5e5e1c6cae0dc21c1677a7ab9c1d77 (diff) |
Merge branch 'eleanor-starter' of https://github.com/brown-dash/Dash-Web into eleanor-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 |