1

在 Touch UI 页面属性编辑器中实现图像裁剪功能是否有任何官方路径,最好需要很少的努力/未来维护?我意识到作者可以转到 DAM 中的源图像并对其进行裁剪,但我们正在寻找类似于内联图像裁剪的功能,该功能通常通过cq:inplaceEditingin出现在标准图像组件中_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这表明我们创建我们自己的组件,但如果已经有解决方案,我不想重新发明轮子。

4

0 回答 0