We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
背景:我的项目中存在主题切换功能,当我进行切换时需要对画布背景色进行重设,但我发现setTheme并不包含对background的设置,且background只在创建实例时可以进行配置,这就需要我重新去创建新的画布实例并重新添加一些画布上之前已经添加过的内容,十分麻烦。 目的:在setTheme中添加一个设置background的方法,或单独封装一个设置setBackground的方法。
The text was updated successfully, but these errors were encountered:
可以用 lf.graphModel.updateBackgroundOptions
lf.graphModel.updateBackgroundOptions
Sorry, something went wrong.
同上面朋友所说,目前已经有这样的方法了 参数类型,见👇🏻 { // 背景图片地址 backgroundImage?: string // CSS background-repeat 属性 backgroundRepeat?: | 'repeat' | 'repeat-x' | 'repeat-y' | 'no-repeat' | 'initial' | 'inherit' [key: string]: any }
No branches or pull requests
背景&目的
背景:我的项目中存在主题切换功能,当我进行切换时需要对画布背景色进行重设,但我发现setTheme并不包含对background的设置,且background只在创建实例时可以进行配置,这就需要我重新去创建新的画布实例并重新添加一些画布上之前已经添加过的内容,十分麻烦。
目的:在setTheme中添加一个设置background的方法,或单独封装一个设置setBackground的方法。
The text was updated successfully, but these errors were encountered: