Skip to content

Commit 9485a95

Browse files
bjarnefleekelleher
authored andcommitted
Image cropper modal import missing component (#20651)
* Import missing component * Handle nullable type * Vertically center image * Add minimum width for SVG without dimensions * 100% height until max height * 100% height minus top/bottom padding * Revert "100% height minus top/bottom padding" This reverts commit 67ada4c. * Revert "Handle nullable type" This reverts commit 3130e11. * Removed flexbox style * Fixed circular dependency --------- Co-authored-by: leekelleher <[email protected]>
1 parent f1ab605 commit 9485a95

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

src/Umbraco.Web.UI.Client/src/packages/media/media/components/input-upload-field/file-upload-preview.element.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { getMimeTypeFromExtension } from '../../components/index.js';
1+
import { getMimeTypeFromExtension } from './utils.js';
22
import type { ManifestFileUploadPreview } from './file-upload-preview.extension.js';
33
import type { UmbFileUploadPreviewElement as UmbFileUploadPreviewElementInterface } from './file-upload-preview.interface.js';
44
import { css, customElement, html, nothing, property, state } from '@umbraco-cms/backoffice/external/lit';

src/Umbraco.Web.UI.Client/src/packages/media/media/components/input-upload-field/preview/input-upload-field-svg.element.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,12 @@ export default class UmbInputUploadFieldSvgElement extends UmbLitElement impleme
1616
static override readonly styles = [
1717
css`
1818
:host {
19+
height: 100%;
1920
min-height: 240px;
2021
max-height: 400px;
22+
2123
width: fit-content;
24+
min-width: 240px;
2225
max-width: 100%;
2326
}
2427

src/Umbraco.Web.UI.Client/src/packages/media/media/modals/image-cropper-editor/image-cropper-editor-modal.element.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ import { UMB_MODAL_MANAGER_CONTEXT, UmbModalBaseElement } from '@umbraco-cms/bac
1515
import { UMB_WORKSPACE_MODAL } from '@umbraco-cms/backoffice/workspace';
1616
import type { UmbModalManagerContext } from '@umbraco-cms/backoffice/modal';
1717

18+
import '../../components/input-upload-field/file-upload-preview.element.js';
19+
1820
@customElement('umb-image-cropper-editor-modal')
1921
export class UmbImageCropperEditorModalElement extends UmbModalBaseElement<
2022
UmbImageCropperEditorModalData<any>,

0 commit comments

Comments
 (0)