Kalileo support a layering architecture where its components are visualized. A developer can integrate its own custom layer. The visualizer method addLayerAt(layer:ICustomLayer=null, index:uint=0) is used for this purpose. This example represents how to add a custom layer and how to add components on it.
var layer:CustomLayer; layer = visualizer.addLayerAt(null,0) as CustomLayer; layer.addChild(getPanel('Panel with Index 0',0.2)); var index:uint = visualizer.numChildren; layer = visualizer.addLayerAt(null,index) as CustomLayer; layer.addChild(getPanel('Panel with Index'+index,0.5));
In this example, two layers were added in two different indexes. In every layer a panel was added as it is shown in the following picture:
the developer can also create its own customLayer implementing ICustomLayer interface. This interface takes into considerations the displace and scale functions, it will be possible to override the functions :
function displace(deltaX:Number, deltaY:Number, withAnimation:Boolean=false, noEvent:Boolean=false):void; function scale(centerPoint:Point,ratio:Number,tweensMap:Dictionary=null,withAnimation:Boolean=false, noEvent:Boolean=false):void;
It is possible then, to manage displace and zoom in custom layers.