) => l.diagram.remove(l));
        return coll;
      } else {
        const map = new go.Map(/*go.Part, Object*/);
        if (parts === null) return map;
        parts.iterator.each((n) => this.gatherConnecteds(map, n));
        return map;
      }
    }

    // Find other attached nodes.
    gatherConnecteds(map, node) {
      if (!(node instanceof go.Node)) return;
      if (map.has(node)) return;
      // record the original Node location, for relative positioning and for cancellation
      map.add(nod