Skip to content
New issue

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

[Bug Report]: 主题设置的两种方式一同使用时,属性合并不完全 #1563

Open
wuchenguang1998 opened this issue Apr 10, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@wuchenguang1998
Copy link
Contributor

wuchenguang1998 commented Apr 10, 2024

发生了什么?

主题设置有两种方式,一种是初始化lf传入,另一种是使用setTheme方法。当两种方式一同使用时,对同一种类型的样式属性不能完全合并。
比如初始化lf时,设置以下属性:
style: { inputText: { background: 'blue' }, baseNode: { fill: 'yellow' }, },
然后使用setTheme,设置以下属性:
lf.setTheme({ polyline: { stroke: 'red' }, baseNode: { stroke: 'green' }, });
这两种方式的设置能合并,但不完全,实际效果是:inputText和polyline的样式都能生效,但baseNode的样式只有stroke: 'green'生效了,而fill: 'yellow'样式没有生效。
复现示例:https://codesandbox.io/p/sandbox/theme-setting-fcd8wv

logicflow/core版本

1.2.24

logicflow/extension版本

1.2.24

logicflow/engine版本

No response

浏览器&环境

No response

@wuchenguang1998 wuchenguang1998 added the bug Something isn't working label Apr 10, 2024
@DymoneLewis DymoneLewis self-assigned this Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants