Packagecom.yworks.graph.model
Interfacepublic interface IFilteredHitTestIterator
Implementors ClosestHitHitTestIteratorWrapper

An interface that can enumerate hits for a certain position in world coordinates filtered by a given filter Function.



Public Methods
 MethodDefined By
  
iterateFilteredHits(x:Number, y:Number, filter:Function = null):Iterator
Yields an iterator that iterates the hits for a given world coordinate.
IFilteredHitTestIterator
Method Detail
iterateFilteredHits()method
public function iterateFilteredHits(x:Number, y:Number, filter:Function = null):Iterator

Yields an iterator that iterates the hits for a given world coordinate. Only elements for which the given filter function returns true are included in the iterator.

The filter function has to use the signature:

function (modelItem:ICanvasObject):Boolean

Parameters

x:Number — the x coordinate in the world coordinate system
 
y:Number — the y coordinate in the world coordinate system
 
filter:Function (default = null) — the filter function used for each ICanvasObject before checking it's coordinates. If null is passed, no filter function is applied.

Returns
Iterator — An iterator that yields filtered hits for the given coordinates