intelliwaketssveltekitv25 1.0.84 → 1.0.86
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -119,19 +119,18 @@
|
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
let divToggle
|
|
123
|
-
let dialogParent = $derived<HTMLDialogElement | null | undefined>(divToggle?.closest('dialog'))
|
|
122
|
+
let divToggle: HTMLDivElement | undefined
|
|
124
123
|
|
|
125
124
|
let windowW = $state<number | undefined>(undefined)
|
|
126
125
|
let windowH = $state<number | undefined>(undefined)
|
|
127
126
|
|
|
128
127
|
let bodyStyle = $state<string | null>(null)
|
|
129
128
|
|
|
130
|
-
function resizeEvent(isShow: boolean, togg: HTMLDivElement | null | undefined,
|
|
129
|
+
function resizeEvent(isShow: boolean, togg: HTMLDivElement | null | undefined, wW: number | undefined, wH: number | undefined) {
|
|
131
130
|
if (wW === undefined || wH === undefined) return
|
|
132
131
|
|
|
133
132
|
const toggleRect = togg?.getBoundingClientRect()
|
|
134
|
-
const dialogRect =
|
|
133
|
+
const dialogRect = togg?.closest('dialog')?.getBoundingClientRect()
|
|
135
134
|
if (toggleRect) {
|
|
136
135
|
const rect = PickProperty(toggleRect, 'x', 'y', 'width', 'height')
|
|
137
136
|
|
|
@@ -182,10 +181,9 @@
|
|
|
182
181
|
}
|
|
183
182
|
|
|
184
183
|
$effect(() => {
|
|
185
|
-
if (resizeTS) {/*No Action*/
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
resizeEvent(show, divToggle, dialogParent, windowW, windowH)
|
|
184
|
+
if (resizeTS) {/*No Action*/}
|
|
185
|
+
if (verbose) console.info('resizeEvent called', show, !!divToggle, windowW, windowH)
|
|
186
|
+
resizeEvent(show, divToggle, windowW, windowH)
|
|
189
187
|
})
|
|
190
188
|
|
|
191
189
|
function getScrollParent(node: HTMLElement | undefined) {
|
|
@@ -243,7 +241,7 @@
|
|
|
243
241
|
}
|
|
244
242
|
|
|
245
243
|
function doResize() {
|
|
246
|
-
resizeEvent(show, divToggle,
|
|
244
|
+
resizeEvent(show, divToggle, windowW, windowH)
|
|
247
245
|
}
|
|
248
246
|
|
|
249
247
|
parentScrolls.forEach(parentScroll => parentScroll.addEventListener('scroll', doResize))
|