Feat:如果没有注册Painter插件,那么节点实例不保存effectiveStyles数据

This commit is contained in:
街角小林
2025-03-26 11:38:48 +08:00
parent 8414d39c4c
commit a55afdd252
2 changed files with 3 additions and 2 deletions

View File

@@ -112,6 +112,8 @@ class Style {
// 更新当前节点生效的样式数据
addToEffectiveStyles(styles) {
// effectiveStyles目前只提供给格式刷插件使用所以如果没有注册该插件那么不需要保存该数据
if (!this.ctx.mindMap.painter) return
this.ctx.effectiveStyles = {
...this.ctx.effectiveStyles,
...styles

View File

@@ -1,8 +1,7 @@
import {
isWhite,
isTransparent,
getVisibleColorFromTheme,
readBlob
getVisibleColorFromTheme
} from '../utils/index'
// 小地图插件