aboutsummaryrefslogtreecommitdiff
path: root/src/Utils.ts
diff options
context:
space:
mode:
authorNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-03-22 22:11:37 -0400
committerNathan-SR <144961007+Nathan-SR@users.noreply.github.com>2024-03-22 22:11:37 -0400
commit3c5bc5b89c3158c6c1dce02f99aa0c08d24dcb39 (patch)
tree99bed6d83f5a01ff2654cd4fb635ea5c48bcc820 /src/Utils.ts
parent26d7e045c5b0a9a29612e68d976e35c0e7e23d00 (diff)
parenta974aa4e6573c8becf93f78610406747fec14c1c (diff)
Merge branch 'master' into nathan-starter
Diffstat (limited to 'src/Utils.ts')
-rw-r--r--src/Utils.ts7
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