Collapsing behaviour

Setting the collapsing option to true will cause segments to be collapsed when dragged to zero size. You will need to provide a way of uncollapsing segments if this is the case, with a call to setCollapsed().