Fix image src not getting set

This commit is contained in:
nathan 2022-04-08 14:03:29 -06:00
parent 2ba299f876
commit 77a11cb5fe
2 changed files with 6 additions and 0 deletions

View File

@ -161,6 +161,7 @@ function send_template()
if (!empty($attrs['image']) && (empty($attrs['background_image']) || $attrs['background_image'] === 'false')) if (!empty($attrs['image']) && (empty($attrs['background_image']) || $attrs['background_image'] === 'false'))
{ {
$tag = 'et2-image'; $tag = 'et2-image';
$attrs['src'] = $attrs['image'];
} }
// novalidation --> noValidation // novalidation --> noValidation
if (!empty($attrs['novalidation']) && in_array($attrs['novalidation'], ['true', '1'], true)) if (!empty($attrs['novalidation']) && in_array($attrs['novalidation'], ['true', '1'], true))

View File

@ -122,6 +122,11 @@ export class Et2Image extends Et2Widget(LitElement) implements et2_IDetachedDOM
} }
} }
get src()
{
return this.__src;
}
_handleClick(_ev : MouseEvent) : boolean _handleClick(_ev : MouseEvent) : boolean
{ {
if(this.href) if(this.href)