mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-09 19:27:44 +02:00
Auto-maximize attached files on open (#9472)
Signed-off-by: Alexander Platov <alexander.platov@hardcoreeng.com>
This commit is contained in:
@@ -69,7 +69,7 @@
|
||||
showTooltip={{ label: attachment.string.OpenInWindow }}
|
||||
on:click={() => {
|
||||
closeTooltip()
|
||||
showPopup(FilePreviewPopup, { file, name: fileName, contentType, metadata }, 'centered')
|
||||
showPopup(FilePreviewPopup, { file, name: fileName, contentType, metadata, fullSize: true }, 'centered')
|
||||
}}
|
||||
/>
|
||||
</svelte:fragment>
|
||||
|
||||
@@ -155,9 +155,12 @@ export function isAttachment (value: Attachment | BlobType): value is WithLookup
|
||||
return (value as Attachment)._id !== undefined
|
||||
}
|
||||
|
||||
export function showAttachmentPreviewPopup (value: WithLookup<Attachment> | BlobType): PopupResult {
|
||||
export function showAttachmentPreviewPopup (
|
||||
value: WithLookup<Attachment> | BlobType,
|
||||
fullSize: boolean = true
|
||||
): PopupResult {
|
||||
closeTooltip()
|
||||
return showPopup(AttachmentPreviewPopup, { value }, getPreviewAlignment(value.type ?? ''))
|
||||
return showPopup(AttachmentPreviewPopup, { value, fullSize }, getPreviewAlignment(value.type ?? ''))
|
||||
}
|
||||
|
||||
interface ImageDimensions {
|
||||
|
||||
Reference in New Issue
Block a user