def ele_overlaps_s(ele, smin, smax):
    """
    returns True if any part of an element is within smin, smax
    """
    s = ele['s']
    if 'L' not in ele:
        return (s >= smin) and (s <= smax)
    else:
        s0 = s - ele['L']
        return  ((s0 >= smin) and (s0 <= smax) or ((s >= smin) and (s <= smax)))