add test value
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { html, customElement, property } from '@umbraco-cms/backoffice/external/lit';
|
||||
import { html, customElement, property, nothing } from '@umbraco-cms/backoffice/external/lit';
|
||||
import { UmbTextStyles } from '@umbraco-cms/backoffice/style';
|
||||
import { UmbPropertyEditorUiElement } from '@umbraco-cms/backoffice/extension-registry';
|
||||
import { UmbLitElement } from '@umbraco-cms/internal/lit-element';
|
||||
@@ -11,13 +11,23 @@ import '../../../components/input-image-cropper/input-image-cropper.element.js';
|
||||
@customElement('umb-property-editor-ui-image-cropper')
|
||||
export class UmbPropertyEditorUIImageCropperElement extends UmbLitElement implements UmbPropertyEditorUiElement {
|
||||
@property()
|
||||
value: any | undefined;
|
||||
value: any = undefined;
|
||||
|
||||
@property({ attribute: false })
|
||||
public config?: UmbPropertyEditorConfigCollection;
|
||||
|
||||
render() {
|
||||
console.log('HEREs', this.value);
|
||||
if (!this.config) return nothing;
|
||||
|
||||
if (!this.value) {
|
||||
this.value = {
|
||||
crops: this.config[0].value,
|
||||
focalPoint: { left: 0.5, top: 0.5 },
|
||||
src: 'https://picsum.photos/seed/picsum/2000/3000',
|
||||
};
|
||||
}
|
||||
|
||||
console.log('this.value', this.value);
|
||||
|
||||
return html`<umb-input-image-cropper .value=${this.value}></umb-input-image-cropper>`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user