Packageardisia.components.miniViewport
Classpublic class MiniViewport
InheritanceMiniViewport Inheritance spark.components.supportClasses.SkinnableComponent

Small viewport designed to help the user navigate scrollable content.

Elements with virtualized layouts will not work properly with this component. This includes lists that use virtualized vertical layouts, and any text component that uses TLF because TLF virtualizes textlines.

To use with lists, do not use virtualization in the layout.

View the technical documentation on the Ardisia Labs website for more information.

DESIGN NOTES



Public Properties
 PropertyDefined By
  viewport : IViewport
The scrollable viewport to map.
MiniViewport
Public Methods
 MethodDefined By
  
dispose():void
Remove the component from the display list and prepare for GC.
MiniViewport
  
update():void
Update the bitmap representation of the viewport.
MiniViewport
Protected Methods
 MethodDefined By
  
eventHandler(event:Event):void
Handles events on the component.
MiniViewport
  
updateViewportScroll(offsetX:Number = 0, offsetY:Number = 0):void
Updates the scrolled values for the viewport depending on the position of the mouse over this control.
MiniViewport
Events
 Event Summary Defined By
  Dispatched when the user updates the viewport's scroll positions via mouse interaction using this component.MiniViewport
  Dispatched when the user finishes dragging the visibleRectPart skin part.MiniViewport
  Dispatched when the user is dragging the visibleRectPart skin part.MiniViewport
  Dispatched when the user starts dragging the visibleRectPart skin part.MiniViewport
Styles
 Style Description Defined By
  
borderAlpha
Type: Number CSS Inheritance: no
The alpha of the border. The default value is 1.
MiniViewport
  
borderColor
Type: uint Format: Color CSS Inheritance: no
The color of the border. The default value is defaults.css.
MiniViewport
  
borderVisible
Type: Boolean CSS Inheritance: no
True to display a border. The default value is true.
MiniViewport
  
visibleRectBackgroundAlpha
Type: Number CSS Inheritance: no
The alpha of the visible rect background. The default value is 0.
MiniViewport
  
visibleRectBackgroundColor
Type: Number CSS Inheritance: no
The color of the visible rect background. The default value is defaults.css.
MiniViewport
  
visibleRectBorderAlpha
Type: Number CSS Inheritance: no
The alpha of the visible rect border. The default value is 1.
MiniViewport
  
visibleRectBorderColor
Type: uint Format: Color CSS Inheritance: no
The color of the visible rect border. The default value is defaults.css.
MiniViewport
Skin Parts

This component uses skins made up of skin parts. Do not set the skin parts directly. The component's skin sets the skin parts.


 Skin Part Description Defined By
  
visibleRectPart:mx.core.UIComponent
Required: true Part Type: Static
A rectangle that overlays the bitmap representation of the viewport, which indicates what portion of the viewport is currently visible.
MiniViewport
Skin States

To skin the component, implement a skin that defines the following states. Although you must implement all skin states, a skin state can be empty. An empty skin state specifies no changes to the default skin state.


 Skin State Description Defined By
  
disabled
MiniViewport
  
normal
MiniViewport
Property Detail
viewportproperty
viewport:IViewport

The scrollable viewport to map.

The default value is null.


Implementation
    public function get viewport():IViewport
    public function set viewport(value:IViewport):void
Method Detail
dispose()method
public function dispose():void

Remove the component from the display list and prepare for GC.

eventHandler()method 
protected function eventHandler(event:Event):void

Handles events on the component.

Parameters

event:Event — the Event that triggered the handler

update()method 
public function update():void

Update the bitmap representation of the viewport.

updateViewportScroll()method 
protected function updateViewportScroll(offsetX:Number = 0, offsetY:Number = 0):void

Updates the scrolled values for the viewport depending on the position of the mouse over this control.

Parameters

offsetX:Number (default = 0) — the offset to apply in the x coordinate
 
offsetY:Number (default = 0) — the offset to apply in the y coordinate

Event Detail
changeScroll Event
Event Object Type: ardisia.components.miniViewport.events.MiniViewportEvent
MiniViewportEvent.type property = ardisia.components.miniViewport.events.MiniViewportEvent

Dispatched when the user updates the viewport's scroll positions via mouse interaction using this component.

dragEnd Event  
Event Object Type: ardisia.components.miniViewport.events.MiniViewportEvent
MiniViewportEvent.type property = ardisia.components.miniViewport.events.MiniViewportEvent

Dispatched when the user finishes dragging the visibleRectPart skin part.

dragging Event  
Event Object Type: ardisia.components.miniViewport.events.MiniViewportEvent
MiniViewportEvent.type property = ardisia.components.miniViewport.events.MiniViewportEvent

Dispatched when the user is dragging the visibleRectPart skin part.

dragStart Event  
Event Object Type: ardisia.components.miniViewport.events.MiniViewportEvent
MiniViewportEvent.type property = ardisia.components.miniViewport.events.MiniViewportEvent

Dispatched when the user starts dragging the visibleRectPart skin part.