|
608 | 608 |
|
609 | 609 | row-headers |
610 | 610 | (for [i (range (count @row-paths)) |
611 | | - :let [row-path (get @row-paths i) |
612 | | - path-ct (count row-path) |
613 | | - end-path (some #(when (= (count %) path-ct) %) ;;TODO make this more efficient. |
614 | | - (drop (inc i) @row-paths)) |
615 | | - {:keys [branch-end?]} (meta row-path) |
616 | | - row-path-prop (cond-> row-path (not show-root-headers?) (subvec 1)) |
617 | | - cross-size (get @safe-row-header-widths |
618 | | - (cond-> (dec path-ct) (not show-root-headers?) dec)) |
619 | | - size (get @row-sizes i)] |
| 611 | + :let [row-path (get @row-paths i) |
| 612 | + path-ct (count row-path) |
| 613 | + end-path (some #(when (= (count %) path-ct) %) ;;TODO make this more efficient. |
| 614 | + (drop (inc i) @row-paths)) |
| 615 | + {:keys [branch-end? leaf?]} (meta row-path) |
| 616 | + row-path-prop (cond-> row-path (not show-root-headers?) (subvec 1)) |
| 617 | + cross-size (get @safe-row-header-widths |
| 618 | + (cond-> (dec path-ct) (not show-root-headers?) dec)) |
| 619 | + size (get @row-sizes i)] |
620 | 620 | :let [props {:part ::row-header |
621 | 621 | :row-path row-path-prop |
622 | 622 | :path row-path-prop |
|
632 | 632 | :grid-column-end -1}} |
633 | 633 | props (assoc props :children [(part ::row-header-label |
634 | 634 | {:props (assoc props |
635 | | - :style (merge {:height (- size 5) |
636 | | - :position :sticky |
637 | | - :top @column-header-height-total} |
| 635 | + :style (merge {:height (- size 5)} |
| 636 | + (when-not leaf? |
| 637 | + {:position :sticky |
| 638 | + :top @column-header-height-total}) |
638 | 639 | (when-not branch-end? |
639 | 640 | {:width (- cross-size 10)}))) |
640 | 641 | :impl ngp/row-header-label})])]] |
|
714 | 715 | ((some-fn :leaf? :show?) column-meta)) |
715 | 716 | :let [props {:row-path (cond-> row-path |
716 | 717 | (not show-root-headers?) (subvec 1) |
717 | | - (:branch-end? row-meta) pop) |
| 718 | + (:branch-end? row-meta) pop) |
718 | 719 | :column-path (cond-> column-path |
719 | | - (not show-root-headers?) (subvec 1) |
| 720 | + (not show-root-headers?) (subvec 1) |
720 | 721 | (:branch-end? column-meta) pop) |
| 722 | + :row-meta row-meta |
| 723 | + :column-meta column-meta |
721 | 724 | :style {:grid-row-start (ngu/path->grid-line-name row-path) |
722 | 725 | :grid-column-start (ngu/path->grid-line-name column-path)}} |
723 | 726 | props (merge props |
|
0 commit comments