{ if (modalHTML) fitPopup(modalHTML, element, contentPanel) if (element === 'movable') { if (popupParams.width === 0 && popupParams.height === 0) { const rect = modalHTML.getBoundingClientRect() popupParams = { x: rect.left, y: rect.top, width: rect.width, height: rect.height } } checkMovable() } windowSize.width = $deviceInfo.docWidth windowSize.height = $deviceInfo.docHeight }} on:keydown={handleKeydown} /> {#if overlay || drag}