鸟类饲养场“forceCropPreset"不工作

Aviary "forceCropPreset" not working

本文关键字:quot 工作 forceCropPreset 饲养场      更新时间:2023-09-26

我有下面的代码,编辑器加载并且不给出错误。但是,它不强制裁剪/调整图像的大小。我直接从示例中复制了配置,…(除了主题是)

有人能帮忙吗?

aviaryObject = new Aviary.Feather({
    apiKey: 'xxxx',
    apiVersion: 3,
    tools: 'all',
    theme: 'light',
    onSave: function(imageID, newURL) {
        var img = document.getElementById(imageID);
        img.src = newURL;
    },
    onError: function(errorObj) {
        alert(errorObj.message);
    }
});
aviaryObject.launch({
    image: 'imgId',
    url: [server-url],
    forceCropPreset: ['Logo','150x150'],
    forceCropMessage: 'Please crop your photo to this size',
});

找到了解决方案,因为我使用https,我必须加载不同的脚本文件。因此,如果您想在https连接上使用aviary,请使用:

https://dme0ih8comzn4.cloudfront.net/js/feather.js