配置controlsOptions不起作用

问题描述 投票:0回答:1

在HTML5版本中无法自定义文本工具的变换比率和字体。

var editor = new PhotoEditorSDK.UI.DesktopUI({
controlsOptions: {
    transform: {
        availableRatios: [
            'imgly_transform_common_custom',
            'imgly_transform_common_square',
            'imgly_transform_common_4-3',
            'imgly_transform_common_16-9'
        ]
    },
    text: {
        replaceFonts: true,
        fonts: [
            {
                fontFamily: 'Alegreya', // The font family name, defined by Google Fonts
                variations: [
                    {
                        identifier: 'alegreya',
                        provider: 'google' // This loads the font from Google Fonts
                    }
                ]
            }
        ]
    }
}});

但没有改变。请帮忙。

javascript photoeditorsdk
1个回答
0
投票

发现错误,controlsOptions必须在编辑器对象内。

© www.soinside.com 2019 - 2024. All rights reserved.