anchor.diff:    int onEdge(Point p) {
       int best;
       num bestDistance = double.INFINITY;
  -    for (int i = 0; i < points.length; i++) {
  -      int second = (i + 1) % points.length;
  -
  -      Point a = points[i];
  -      Point b = points[second];
  +    for (int i = 0; i < this.points.length; i++) {
  +      int second = (i + 1) % this.points.length;
  +
  +      Point a = this.points[i];
  +      Point b = this.points[second];
   
         num dist;
         if (a.x == b.x) {
  
positive.code:     g.strokeStyle = stroke.rgba;
  
      g.beginPath();
      g.moveTo(points[0].x, points[0].y);
      points.sublist(1).forEach((p) => g.lineTo(p.x, p.y));
      g.closePath();
  
      g.fill();
  
negative.code:     }
  
      if (selectedEdge != null) {
        int next = (selectedEdge+1) % this.points.length;
        g.beginPath();
        g.moveTo(points[selectedEdge].x, this.points[selectedEdge].y);
        g.lineTo(points[next].x, this.points[next].y);
        g.closePath();
        g.lineWidth = 3;
        g.stroke();
  