Packagecom.yworks.canvas.drawing
Classpublic class HitTestables
InheritanceHitTestables Inheritance Object

A utility class that provides simple IHitTestable implementations.



Public Methods
 MethodDefined By
  
create(handlerFunction:Function):IHitTestable
[static] Wrap a handler into an interface.
HitTestables
  
[static] Creates and returns an IHitTestable that always returns true.
HitTestables
  
[static] Creates and returns an IHitTestable that always returns false.
HitTestables
Method Detail
create()method
public static function create(handlerFunction:Function):IHitTestable

Wrap a handler into an interface.

the handler has to adhere to the following interface: function handlerFunction( x:Number, y:Number, ctx:ICanvasContext ):Boolean { ... }

Parameters

handlerFunction:Function — the handler to wrap.

Returns
IHitTestable — An IHitTestable with the wrapped handler function.
getAlways()method 
public static function getAlways():IHitTestable

Creates and returns an IHitTestable that always returns true.

Returns
IHitTestable — An IHitTestable that always returns true.
getNever()method 
public static function getNever():IHitTestable

Creates and returns an IHitTestable that always returns false.

Returns
IHitTestable — An IHitTestable that always returns false.