use ResizeObserver instead of set events on the connection window

This commit is contained in:
David Botton 2024-08-11 18:51:17 -04:00
parent 4c2fd7d8e3
commit d924cc437c

View file

@ -122,14 +122,17 @@
(funcall (getf control-record :on-setup) (funcall (getf control-record :on-setup)
control control-record) control control-record)
handler))) handler)))
(unless (equal resizeh "") (unless (equal resizeh "")
(push (format nil (push (format nil
" \(set-on-resize \(window \(connection-body panel\)\) " \(js-execute panel
\(lambda \(obj\) \(format nil \"new ResizeObserver\(\(\) => {
\(declare \(ignore obj\)\) ~~A.trigger\('resize'\);
\(jquery-trigger \(~A panel\) \"resize\"\)\)\)" }\).observe\(~~A\)\"
vname) \(jquery \(~A panel\)\)
creates)) \(script-id \(~A panel\)\)\)\)"
vname
vname)
creates))
(unless (equal handler "") (unless (equal handler "")
(push (format nil (push (format nil
" \(let \(\(target \(~A panel\)\)\) ~ " \(let \(\(target \(~A panel\)\)\) ~