|
437 | 437 | :when (or leaf? show?) |
438 | 438 | :let [showing-row-path (cond-> showing-row-path (not show-root-headers?) (subvec 1)) |
439 | 439 | this-depth (count showing-row-path)]] |
440 | | - (for [i (cond-> (range @row-depth) (not show-root-headers?) rest) |
441 | | - :let [row-path (subvec showing-row-path 0 (min i this-depth)) |
| 440 | + (for [i (range @row-depth) |
| 441 | + :let [row-path (subvec showing-row-path 0 (min (inc i) this-depth)) |
442 | 442 | {:keys [branch-end?]} (meta row-path) |
443 | 443 | props {:row-path row-path |
444 | 444 | :path row-path |
445 | 445 | :branch-end? branch-end?}]] |
446 | 446 | (on-export-row-header props))) |
447 | | - column-headers (for [i (cond-> (range @column-depth) (not show-root-headers?) rest)] |
| 447 | + column-headers (for [i (range @column-depth)] |
448 | 448 | (for [showing-column-path (cond-> column-paths (not show-root-headers?) rest) |
449 | 449 | :let [{:keys [leaf? show?]} (meta showing-column-path)] |
450 | 450 | :when (or leaf? show?) |
451 | 451 | :let [showing-column-path (cond-> showing-column-path (not show-root-headers?) (subvec 1)) |
452 | 452 | this-depth (count showing-column-path) |
453 | | - column-path (subvec showing-column-path 0 (min i this-depth)) |
| 453 | + column-path (subvec showing-column-path 0 (min (inc i) this-depth)) |
454 | 454 | {:keys [branch-end?]} (meta column-path) |
455 | 455 | props {:column-path column-path |
456 | 456 | :path column-path |
457 | 457 | :branch-end? branch-end?}]] |
458 | 458 | (on-export-column-header props))) |
459 | | - corner-headers (for [row-index (cond-> (range @column-depth) (not show-root-headers?) rest)] |
460 | | - (for [column-index (cond-> (range @row-depth) (not show-root-headers?) rest) |
461 | | - :let [props {:row-index (cond-> row-index (not show-root-headers?) dec) |
462 | | - :column-index (cond-> column-index (not show-root-headers?) dec) |
463 | | - :row-depth (cond-> @row-depth (not show-root-headers?) dec) |
464 | | - :column-depth (cond-> @column-depth (not show-root-headers?) dec)} |
| 459 | + corner-headers (for [row-index (range @column-depth)] |
| 460 | + (for [column-index (range @row-depth) |
| 461 | + :let [props {:row-index row-index |
| 462 | + :column-index column-index |
| 463 | + :row-depth @row-depth |
| 464 | + :column-depth @column-depth} |
465 | 465 | props (merge props {:edge (corner-header-edges props)})]] |
466 | 466 | (on-export-corner-header props))) |
467 | 467 | cells (for [row-path row-paths |
|
0 commit comments