This repository was archived by the owner on Nov 6, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-13
lines changed
components/input-image-cropper
modals/image-cropper-editor/components Expand file tree Collapse file tree 2 files changed +10
-13
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,9 @@ export class UmbImageCropperPreviewElement extends LitElement {
1313 @property ( { type : String , attribute : false } )
1414 src : string = '' ;
1515
16+ @property ( { type : String } )
17+ label ?: string ;
18+
1619 @property ( { attribute : false } )
1720 get focalPoint ( ) {
1821 return this . #focalPoint;
@@ -140,14 +143,14 @@ export class UmbImageCropperPreviewElement extends LitElement {
140143
141144 render ( ) {
142145 if ( ! this . crop ) {
143- return nothing ;
146+ return html `<span id = "label" > ${ this . label } < / span > ` ;
144147 }
145148
146149 return html `
147150 <div id= "container" >
148151 <img id= "image" src = ${ this . src } alt= "" / >
149152 </ div>
150- <span id= "alias" > ${ this . crop . alias } </ span>
153+ <span id= "alias" > ${ this . label ?? this . crop . alias } </ span>
151154 <span id= "dimensions" > ${ this . crop . width } x ${ this . crop . height } </ span>
152155 ${ this . crop . coordinates
153156 ? html `<span id= "user-defined" > <umb- localize key= "imagecropper_customCrop" > User defined </ umb- localize> </ span> `
@@ -178,6 +181,9 @@ export class UmbImageCropperPreviewElement extends LitElement {
178181 max-height : 200px ;
179182 user-select : none;
180183 }
184+ # label {
185+ font-weight : bold;
186+ }
181187 # alias {
182188 font-weight : bold;
183189 margin-top : var (--uui-size-space-3 );
Original file line number Diff line number Diff line change @@ -29,11 +29,10 @@ export class UmbImageCropperEditorFieldElement extends UmbInputImageCropperField
2929 override renderSide ( ) {
3030 if ( ! this . value || ! this . crops ) return ;
3131
32- return html ` <uui- menu- item
33- id= "reset-current-crop"
32+ return html ` <umb- image-cropper- preview
3433 @click = ${ this . #resetCurrentCrop}
3534 ?active= ${ ! this . currentCrop }
36- label= ${ this . localize . term ( 'general_media' ) } > </ uui - menu - item >
35+ . label = ${ this . localize . term ( 'general_media' ) } > </ umb - image-cropper - preview >
3736
3837 ${ repeat (
3938 this . crops ,
@@ -75,14 +74,6 @@ export class UmbImageCropperEditorFieldElement extends UmbInputImageCropperField
7574 padding-right : var (--uui-size-3 );
7675 }
7776
78- # reset-current-crop {
79- --uui-menu-item-flat-structure : 1 ;
80- --uui-menu-item-border-radius : var (--uui-border-radius );
81- border-radius : var (--uui-border-radius );
82- width : 100% ;
83- background-color : var (--uui-color-surface );
84- }
85-
8677 slot [name = 'actions' ] {
8778 display : block;
8879 flex : 1 ;
You can’t perform that action at this time.
0 commit comments