aboutsummaryrefslogtreecommitdiff
path: root/src/Utils.ts
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-03-04 16:07:52 -0500
committerbobzel <zzzman@gmail.com>2024-03-04 16:07:52 -0500
commit2e99ef0512b8f1b5c089637643ff6addf5afd943 (patch)
treeb8cff42df265b24b47bc0e90d827b07110308e2f /src/Utils.ts
parent49cfa95fdb3653a1224d4e5e3380e111c8e2014f (diff)
cleaned up a number of things related to autoHeight and stacking/masonry/notetaking views
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