Commit e34f7db
committed
fix: render shapes unannotated by the table with na_color instead of dropping them (#710)
render_shapes joined the element to its table with how="inner", silently dropping shapes whose
instance had no table row. Points (how="left" merge) and labels (raster + na_color) keep unannotated
elements, so shapes were the inconsistent outlier (and it broke the labels<->shapes interchangeability).
Switch _join_table_for_element to how="left": all shapes survive, and the per-shape color lookup
(_extract_color_column, reindexed to the element) yields NaN -> na_color for the unannotated ones, via
the existing NaN-handling path. Fully-annotated data is unaffected (verified pixel-identical: inner == left
when nothing is dropped), so only partial-annotation output changes.
Adds a visual regression test: coloring blobs_polygons by a table column now renders the one unannotated
polygon (instance 0 has no table row) with na_color instead of dropping it.1 parent 8d74219 commit e34f7db
3 files changed
Lines changed: 14 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
646 | 646 | | |
647 | 647 | | |
648 | 648 | | |
649 | | - | |
| 649 | + | |
650 | 650 | | |
651 | 651 | | |
652 | 652 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
444 | 444 | | |
445 | 445 | | |
446 | 446 | | |
447 | | - | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
448 | 452 | | |
449 | 453 | | |
450 | 454 | | |
| |||
470 | 474 | | |
471 | 475 | | |
472 | 476 | | |
473 | | - | |
| 477 | + | |
474 | 478 | | |
475 | 479 | | |
476 | 480 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
439 | 439 | | |
440 | 440 | | |
441 | 441 | | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
442 | 449 | | |
443 | 450 | | |
444 | 451 | | |
| |||
0 commit comments