So the comment "// Do this regardless of [locked], just to be sure." isn't
correct?


On Thu, Nov 14, 2013 at 2:32 PM, Sergey Shevchenko <notifications@github.com
> wrote:

> In widgets/lib/spark-splitter/spark-splitter.dart:
>
> > +  }
> > +
> > +  /// While dragging, update the target's size based on the mouse movement.
> > +  void drag(MouseEvent e) {
> > +    // Recheck [locked], in case it's been changed externally.
> > +    if (!locked) {
> > +      _updateTargetSize(_isHorizontal ? e.movement.y : e.movement.x);
> > +    }
> > +  }
> > +
> > +  /// When dragging stops, unsubscribe from monitoring dragging events except
> > +  /// the starting one.
> > +  void dragEnd(MouseEvent e) {
> > +    assert(_dragSubscr != null && _dragEndSubscr != null);
> > +    // Do this regardless of [locked], just to be sure.
> > +    _dragSubscr.cancel();
>
> They will be, but only if locked==true already during onMouseDown. But in
> that case, this event handler is not activated in the first place, so we
> wouldn't even get here. If [locked] becomes true in mid-flight, these
> subscriptions will still be non-null.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/dart-lang/spark/pull/211/files#r7675923>
> .
>