- Real ly = robust_scm2double (me->get_property ("left-position"), 0);
- Real ry = robust_scm2double (me->get_property ("right-position"), 0);
+
+ Interval x_span;
+ Direction d = LEFT;
+ do
+ {
+ x_span[d] = robust_relative_extent (bounds[d], commonx, X_AXIS)[d];
+
+ 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?
+ */
+ Real padding = 1.0;
+
+ if (bounds[d]->break_status_dir ())
+ padding = 0.0;
+
+ x_span[d] = robust_relative_extent (bounds[d], commonx, X_AXIS) [LEFT] - padding;
+ }
+ }
+ while (flip (&d) != LEFT);
+