This page describes the options which can be set in the second argument when creating a new Scatter instance.
Controls how items are arranged.
Default radial
Mode that applies initially, until arrange is called.
Default unset (i.e. inherits Mode value)
If set, select is immediately called on the item at specified index.
That is, this:
ScatterObj = new Scatter(Container,{InitialSelect:0})
is equivalent to this:
ScatterObj = new Scatter(Container,{});
ScatterObj.select(0)
Default unset
Class to add to the item when selected (and remove when discarded).
Default "selected"
A selected item is scaled to this value.
Default 1.5
All unselected items are scaled to this value.
Default 1.0
How much each item can be rotated.
This value is a magnitude, so range of rotation is twice (from negative to positive).
Default 10
Whether item ordering should be shuffled.
Default true for random,radial; false for all other modes.
An object indicating functions to bind to specific events on the container.
The built-in methods must be defined as strings, but for all other functions, pass in the function itself.
Default value is {click:"arrange"}
- i.e. clicking the container arranges items.
To disable default behaviour without specifying a new function, use {click:void 0}
An object indicating functions to bind to specific events on the children of the container.
The built-in methods must be defined as strings, but for all other functions, pass in the function itself.
Default is {click:"select"}
- i.e. clicking a container child selects that item.
To disable default behaviour without specifying a new function, use {click:void 0}
The options listed below only apply when arranging items by the mode the option name starts with (i.e. grid, pile, radial, fixed).
Boolean, specifies whether items in grid mode should be centered (true), or in top left (false).
Default true
Integer, how many pixels of space should seperate items in grid mode.
Default 1
Override GridSpacing horizontally.
Default unset
Override GridSpacing vertically.
Default unset
Numeric. The width of an item is divided by this number to determine maximum random offset.
Default 3
Numeric. The random horizontal offset for radial mode is multiplied by this number.
Default 0.85
Numeric. The random vertical offset for radial mode is multiplied by this number.
Default 1.2
Numeric. The smallest random offset allowed - prevents too much clustering in the center.
Default 0.5
Whether fixed mode positions are relative to the top left corner, or center of the container.
Default center
Array of item positions; accepts arrays or objects (but not both in same array).
[x,y], [x,y,angle], {left:x,top:y}, {left:x,top:y,angle:a}
Default: unset