Constructor
new BreadCrumb(optionsopt)
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
options
Properties
|
- Source:
Methods
_makeCrumbs(dir) → {Object.<String, String>}
Makes a breadcrumb structure based on the given path
Parameters:
Name | Type | Description |
---|---|---|
dir |
String | path to split into a breadcrumb structure |
- Source:
Returns:
map of {dir: path, name: displayName}
- Type
- Object.<String, String>
_updateTotalWidth()
Calculate the total breadcrumb width when
all crumbs are expanded
- Source:
getCrumbUrl(part, index)
Returns the full URL to the given directory
Parameters:
Name | Type | Description |
---|---|---|
part |
Object.<String, String> | crumb data as map |
index |
int | crumb index |
- Source:
Returns:
full URL
render()
Renders the breadcrumb elements
- Source:
setDirectory(dir)
Sets the directory to be displayed as breadcrumb.
This will re-render the breadcrumb.
Parameters:
Name | Type | Description |
---|---|---|
dir |
path to be displayed as breadcrumb |
- Source:
setMaxWidth(availableWidth)
Show/hide breadcrumbs to fit the given width
Parameters:
Name | Type | Description |
---|---|---|
availableWidth |
int | available width |
- Source: