Commit d596235
committed
fix(style): remove spec-level defaults that override per-node data styles
G6 v5's getElementComputedStyle merges styles as
Object.assign({}, theme, palette, dataStyle, specDefault, stateStyle),
so spec-level node/edge type and style always override per-node data.
Remove them from the Graph constructor and use halo-only selection
indicator to avoid overriding user-customizable border properties.
Add 26 regression tests guarding against reintroduction.1 parent 701f817 commit d596235
2 files changed
Lines changed: 516 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
227 | 231 | | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | 232 | | |
236 | 233 | | |
237 | | - | |
238 | | - | |
239 | 234 | | |
240 | 235 | | |
| 236 | + | |
241 | 237 | | |
242 | 238 | | |
243 | 239 | | |
244 | 240 | | |
245 | 241 | | |
246 | 242 | | |
247 | | - | |
248 | | - | |
249 | | - | |
250 | | - | |
251 | | - | |
252 | 243 | | |
253 | 244 | | |
254 | 245 | | |
| |||
0 commit comments