+ {
+ /*
+ If 'me' is placed relative to any cross-staff element with a
+ 'direction callback defined, the placement of 'me' is likely
+ to depend on staff-spacing, thus 'me' should be considered
+ cross-staff.
+ */
+ if (to_boolean (elts[i]->get_property ("cross-staff"))
+ && !is_direction (elts[i]->get_property_data ("direction")))
+ return SCM_BOOL_T;
+
+ /*
+ If elts[i] is cross-staff and is pointing in the same
+ direction as 'me', we assume that the alignment
+ of 'me' is influenced the cross-staffitude of elts[i]
+ and thus we mark 'me' as cross-staff.
+ */
+ if (to_boolean (elts[i]->get_property ("cross-staff"))
+ && my_dir == get_grob_direction (elts[i]))
+ return SCM_BOOL_T;
+ }
+