问题描述
在Touch UI页面属性编辑器中实现图像裁剪功能是否有任何正式途径,最好是不费吹灰之力或将来进行维护?我意识到作者可以在dam中转到源图像并对其进行裁剪,但是我们正在寻找类似于内联图像裁剪的功能,该功能通常通过cq:inplaceEditing
中的_cq_editConfig.xml
在标准图像组件中出现。
我知道cq/gui/components/common/wcm/pagethumbnail
组件,它允许作者从dam中选择资产,从本地文件系统上载图像,并将图像重置为预览图像。不幸的是,由于不包括图像裁剪功能而无法实现。例如:
<thumbnail
cq:showOnCreate="{Boolean}true"
jcr:primaryType="nt:unstructured"
sling:resourceType="cq/gui/components/common/wcm/pagethumbnail"
page="${empty param.item ? requestPathInfo.suffix : param.item}"
quiet="{Boolean}true">
<upload
granite:class="cq-wcm-fileupload"
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/form/fileupload"
async="{Boolean}true"
autoStart="{Boolean}false"
multiple="{Boolean}false"
name="./image/file.sftmp"
sizeLimit="100000000"
text="Upload Image"
uploadUrl="will_be_replaced">
<granite:data
jcr:primaryType="nt:unstructured"
cq-msm-lockable="./image"/>
</upload>
<assetpicker
granite:class="js-browse-activator"
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/button"
text="Select Image">
<granite:data
jcr:primaryType="nt:unstructured"
cq-msm-lockable="./image"/>
</assetpicker>
<preview
jcr:primaryType="nt:unstructured"
sling:resourceType="cq/gui/components/siteadmin/admin/pagepreview"/>
</thumbnail>
我看过这篇文章https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/crop-an-image-in-touch-ui-page-properties/qaq-p/318414,它建议我们创建自己的组件,但如果已经有解决方案,我不希望重新发明轮子。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)