+ if (Spanner *mother = dynamic_cast<Spanner*> (me->original_))
+ {
+ int k = broken_spanner_index (dynamic_cast<Spanner*> (me));
+ int j = k + dir;
+ if (j < 0 || j >= mother->broken_intos_.size ())
+ return o;
+
+ Grob *neighbour = mother->broken_intos_[j];
+ if (dir == RIGHT)
+ neighbour->set_property ("direction",
+ me->get_property ("direction"));
+ Real neighbour_y = get_boundary_notecolumn_y (neighbour, dir);
+ Real y = get_boundary_notecolumn_y (me, -dir);
+ int neighbour_cols = scm_ilength (neighbour->get_property ("note-columns"));
+ int cols = scm_ilength (me->get_property ("note-columns"));
+ o = Offset (0, (y*neighbour_cols + neighbour_y*cols) /
+ (cols + neighbour_cols));
+ }
+ return o;
+}