code: function(event) {
          var point = event.vertex;
          var components = this.line.geometry.components;
          // ensure that vertices of interior ring are contained by exterior ring
          if (!this.polygon.geometry.intersects(point)) {
              var last = components[components.length-3];
              point.x = last.x;
              point.y = last.y;
          }
      }
docs: Method: enforceTopology
  Simple topology enforcement for drawing interior rings.  Ensures vertices
  of interior rings are contained by exterior ring.  Other topology
  rules are enforced in <finalizeInteriorRing> to allow drawing of
  rings that intersect only during the sketch (e.g. a "C" shaped ring
  that nearly encloses another ring).