new BorderPalette(opt_id=)
Creates a new BorderPalette object.
Use this class to create a palette of border styles.
Parameters:
Name | Type | Argument | Description |
---|---|---|---|
opt_id= |
string | number |
<optional> |
An optional id. If an id is not passed, a default id is created. |
- Source:
Members
-
<private, static> _idCount :number
-
Increments as each BorderPalette is created.
Type:
- number
- Default Value:
- 0
- Source:
-
<private> _borders
-
Holds a list of border styles.
- Source:
Methods
-
addBorder(options)
-
Adds a random number of the passed border style to the 'borders' array.
Parameters:
Name Type Description options
Object A set of required options that includes: options.min {number} The minimum number of styles to add. options.max {number} The maximum number of styles to add. options.style {string} The border style. - Source:
-
getBorder()
-
- Source:
Throws:
-
If the 'borders' property is empty.
- Type
- Error
Returns:
A style randomly selected from the 'borders' property.