 nearbyports = null;
        let closestDistance = 20 * 20; // don't bother taking sqrt
        let closestPort = null;
        let closestPortPt = null;
        let nodePort = null;
        const mit = node.ports;
        while (mit.next()) {
          const port = mit.value;
          if (node.findLinksConnected(port.portId).filter((l) => l.category === '').count > 0)
            continue;
          const portPt = port.getDocumentPoint(go.Spot.Center);
          portPt.add(snapoffset); // where it would b