| 120851 | } |
| 120852 | }); |
| 120853 | function shouldReflow(group) { |
| 120854 | // We typically should reflow if layout is invoked (#2568), as child items |
| 120855 | // may have resized and reflow ensures group bounds are re-calculated. |
| 120856 | // However, legend entries have a special exception to avoid instability. |
| 120857 | // For example, if a selected legend symbol gains a stroke on hover, |
| 120858 | // we don't want to re-position subsequent elements in the legend. |
| 120859 | return group && group.mark.role !== "legend-entry"; |
| 120860 | } |
| 120861 | function layoutGroup(view, group, _) { |
| 120862 | var items = group.items, width = Math.max(0, group.width || 0), height = Math.max(0, group.height || 0), viewBounds = new (0, _vegaScenegraph.Bounds)().set(0, 0, width, height), xBounds = viewBounds.clone(), yBounds = viewBounds.clone(), legends = [], title, mark, orient, b1, i, n; // layout axes, gather legends, collect bounds |
| 120863 | for(i = 0, n = items.length; i < n; ++i){ |