微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

如何在触摸UI页面属性中启用图像裁剪

如何解决如何在触摸UI页面属性中启用图像裁剪

在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 举报,一经查实,本站将立刻删除。