- Real x0 = robust_relative_extent (lgr, commonx, X_AXIS)[LEFT];
- Real x1 = robust_relative_extent (rgr, commonx, X_AXIS)[RIGHT];
- Real w = x1 -x0;
+ Drul_array<bool> connect_to_other;
+ Interval x_span;
+ Direction d = LEFT;
+ do
+ {
+ x_span[d] = robust_relative_extent (bounds[d], commonx, X_AXIS)[d];
+ Direction break_dir = bounds[d]->break_status_dir ();
+ Spanner *orig_spanner = dynamic_cast<Spanner *> (me->original_);
+ connect_to_other[d]
+ = (break_dir
+ && (me->get_break_index () - break_dir < orig_spanner->broken_intos_.size ()));
+
+ if (connect_to_other[d])
+ {
+ Interval overshoot (robust_scm2drul (me->get_property ("break-overshoot"),
+ Interval (-0.5, 0.0)));
+
+ if (d == RIGHT)
+ x_span[d] += d * overshoot[d];
+ else
+ x_span[d] = robust_relative_extent (bounds[d], commonx, X_AXIS)[RIGHT]
+ - overshoot[LEFT];
+ }
+ else if (d == RIGHT
+ && (columns.is_empty ()
+ || (bounds[d]->get_column ()
+ != dynamic_cast<Item *> (columns.top ())->get_column ())))
+ {
+ /*
+ TODO: make padding tunable?
+ */
+ x_span[d] = robust_relative_extent (bounds[d], commonx, X_AXIS) [LEFT] - 1.0;
+ }
+ }
+ while (flip (&d) != LEFT);