You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#### Node, Edge, Text and Other Element Style Priority
115
117
1. Built-in base styles (defaultTheme)
116
118
2. Applied theme mode styles (specified via `themeMode` or second parameter of `setTheme`)
117
119
3. Custom styles (specified via `style` or first parameter of `setTheme`)
118
120
121
+
#### Background and Grid Style Priority
122
+
Background and grid configurations have independent update mechanisms, with priority divided into two phases:
123
+
124
+
**Initialization Phase Priority** (from low to high):
125
+
1. Configuration in style: `background` and `grid` configurations in the constructor's `style` parameter
126
+
2. Direct Parameter Configuration: Values set through `background` and `grid` parameters in the constructor (overrides configurations in style)
127
+
128
+
**Runtime Phase Priority** (from low to high):
129
+
1. Current Configuration: `background` and `grid` configurations after initialization
130
+
2. Theme Mode Configuration: When calling `setTheme(style, themeMode)`, background and grid configurations in themeMode will override current configuration
131
+
3. Custom Configuration: `background` and `grid` configurations in the style parameter of `setTheme(style, themeMode)` will override theme mode configuration
132
+
133
+
```tsx | pure
134
+
// Example: Priority application of background and grid
135
+
136
+
// Initialization: Direct parameters > style parameters
0 commit comments