discontinuedPackage jet_cad_floor_plan has been discontinued and replaced by jet_cad_2d_plan.

accept method

  1. @override
void accept(
  1. Vector2 point,
  2. ToolContext ctx
)

Implementation

@override
void accept(Vector2 point, ToolContext ctx) {
  if (points.isEmpty) {
    points.add(point);
    _refresh(ctx);
    return;
  }
  if (points.length == 1) {
    if (!_degenerate(ctx, points.first, point)) points.add(point);
    _refresh(ctx);
    return;
  }
  _commit(point, ctx);
  // The document changed: nothing memoised before it is read again. The
  // hover's ring is re-read at the next move (or when the change is
  // heard), so the commit itself makes its two searches only.
  _generation++;
  clearShape();
}