Packagetwaver.network.interaction
Classpublic class MapFilterInteractionHandler
InheritanceMapFilterInteractionHandler Inheritance BasicInteractionHandler Inheritance Object

This interaction used to create a distorted image around mouse cursor area to show some special effect such as fisheye, magnifier etc. Install this handler on network to get the ability to show a fisheye or magnifier cursor on network canvas.

Here is an example how to create a fisheye interaction handlers on network canvas:

	 network.interactionHandlers = new Collection([
	 	new MapFilterInteractionHandler(network, Consts.MAP_FILTER_FISHEYE, 55, 35)
	 ]);
	 
	 //create a magnifier interaction:
	 network.interactionHandlers = new Collection([
	 	new SelectInteractionHandler(network),
	 	new EditInteractionHandler(network),
	 	new MoveInteractionHandler(network),
	 	new DefaultInteractionHandler(network),
	 	new MapFilterInteractionHandler(network, Consts.MAP_FILTER_MAGNIFY),
	 ]);
	 

See also

Consts.MAP_FILTER_FISHEYE
Consts.MAP_FILTER_MAGNIFY


Public Properties
 PropertyDefined By
  bitmapData : BitmapData
Get bitmap data of this distorted map filter.
MapFilterInteractionHandler
  mapFilter : String
Get the distorted image map filter name.
MapFilterInteractionHandler
  xRadius : Number
Get x radius of the distorted map filter.
MapFilterInteractionHandler
  yRadius : Number
Get y radius of the distorted map filter.
MapFilterInteractionHandler
Protected Properties
 PropertyDefined By
 Inheritednetwork : Network
[read-only] Get network component of this interaction.
BasicInteractionHandler
Public Methods
 MethodDefined By
  
MapFilterInteractionHandler(network:Network, mapFilter:String, xRadius:int = 100, yRadius:int = 100)
Handler constructor.
MapFilterInteractionHandler
  
[override] Install listeners on this interaction.
MapFilterInteractionHandler
  
[override] Uninstall listeners on this interaction.
MapFilterInteractionHandler
Protected Methods
 MethodDefined By
 Inherited
dispatchEvent(kind:String, e:MouseEvent, element:IElement = null, resizeDirection:String = null, pointIndex:int = -1):void
Dispatch event to listeners.
BasicInteractionHandler
Property Detail
bitmapDataproperty
bitmapData:BitmapData

Get bitmap data of this distorted map filter. This bitmap data controls the image distortion.


Implementation
    public function get bitmapData():BitmapData
    public function set bitmapData(value:BitmapData):void
mapFilterproperty 
mapFilter:String

Get the distorted image map filter name. This can be:


Implementation
    public function get mapFilter():String
    public function set mapFilter(value:String):void
xRadiusproperty 
xRadius:Number

Get x radius of the distorted map filter.


Implementation
    public function get xRadius():Number
    public function set xRadius(value:Number):void
yRadiusproperty 
yRadius:Number

Get y radius of the distorted map filter.


Implementation
    public function get yRadius():Number
    public function set yRadius(value:Number):void
Constructor Detail
MapFilterInteractionHandler()Constructor
public function MapFilterInteractionHandler(network:Network, mapFilter:String, xRadius:int = 100, yRadius:int = 100)

Handler constructor.

Parameters
network:Network — network handler work with
 
mapFilter:String (default = NaN) — the image distorted map filter. This can be:
  • Consts.MAP_FILTER_FISHEYE
  • Consts.MAP_FILTER_MAGNIFY
  • Consts.MAP_FILTER_IMAGE
 
xRadius:int (default = 100) — x radius of the distorted map filter.
 
yRadius:int (default = 100) — y radius of the distorted map filter.
Method Detail
installListeners()method
override public function installListeners():void

Install listeners on this interaction.

uninstallListeners()method 
override public function uninstallListeners():void

Uninstall listeners on this interaction.