findObjectsNear<T extends GraphObject, S extends Iterable<T>> method

S findObjectsNear<T extends GraphObject, S extends Iterable<T>>(
  1. Point p,
  2. num dist, [
  3. T? navig(
    1. GraphObject
    )?,
  4. bool pred(
    1. T
    )?,
  5. Object? partialInclusion,
  6. S? coll,
])

Returns a collection of all GraphObjects that are within a certain distance of a given point in document coordinates.

If #visible is false, this method will not find any objects in this layer. However, #opacity does not affect this method. @param {Point} p A Point in document coordinates. @param {number} dist The distance from the point. @param {function(GraphObject):GraphObject | null=} navig A function taking a GraphObject and returning a GraphObject, defaulting to the identity. If this function returns null, the given GraphObject will not be included in the results. @param {function(GraphObject):boolean | null=} pred A function taking the GraphObject returned by navig and returning true if that object should be returned, defaulting to a predicate that always returns true. @param {*=} partialInclusion Whether an object can match if it merely intersects the circular area (true) or if it must be entirely inside the circular area (false). The default value is true. @param {List.

Implementation

S findObjectsNear<T extends _i3.GraphObject, S extends _i3.Iterable<T>>(
  _i3.Point p,
  _i2.num dist, [
  T? Function(_i3.GraphObject)? navig,
  _i2.bool Function(T)? pred,
  _i2.Object? partialInclusion,
  S? coll,
]) =>
    _i4.callMethod(
      this,
      'findObjectsNear',
      [
        p,
        dist,
        navig == null
            ? _i5.undefined
            : _i4.allowInterop((p0) => () => navig(p0) ?? _i5.undefined),
        pred == null ? _i5.undefined : _i4.allowInterop(pred),
        partialInclusion ?? _i5.undefined,
        coll ?? _i5.undefined,
      ],
    );