Navigation Icons API
Navigation Icons Overview
Wraps the set of Navigation Icons and assists in determining the position of each navigation icon.
Join the infusion-users mailing list and ask your questions there.
Adding a Navigation Icons Component
Option 1: Typically used as a sub-component of a Navigation component.
Adding as sub-component:
navIcons: { type: "gpii.firstDiscovery.navIcons", container: "{nav}.dom.navIcons", options: {} }
Option 2: Adding as a stand alone component:
var myNavIcons = gpii.firstDiscovery.navIcons(container, options);
Grades
The base grades used by the Navigation Icons:
Model
Path | Description | Values | Default |
---|---|---|---|
| Corresponds to the index of the current panel. | Panel ID ( | 0 |
iconWidth | The width of the icon. Used to determine where to scroll to make it visible. | Number (in pixels) | 0 |
Supported Events
Event | Type | Description | Parameters | Parameter Description |
---|---|---|---|---|
| default | Fired to trigger the creation of each navigation icon |
|
|
Subcomponents
Name | Description | Values | Default |
---|---|---|---|
| This is a dynamic component. A new instance is created for each | icon: { createOnEvent: "onCreateIcon", type: "gpii.firstDiscovery.icon", container: "{arguments}.0", options: { position: "{arguments}.1", styles: "{navIcons}.options.styles", modelListeners: { "{navIcons}.model.currentPanelNum": { listener: "gpii.firstDiscovery.navIcons.updateIconModel", args: ["{that}", "{change}.value", "{change}.oldValue"] }, "{navIcons}.model.pageNum": { listener: "gpii.firstDiscovery.icon.measure", args: ["{that}", "{navIcons}.applier", "iconWidth"], priority: 10 } } } } |
Options
Name | Description | Values | Default |
---|---|---|---|
| The maximum number of icons to show at a time. |
| pageSize: 5 |
| A list of all the panel positions which have no Navigation Icons. | An array of indexes (
| iconHoles: [2, 8] |
| Javascript object containing selectors for various fragments of the markup, including the containers for the subcomponents. |
|
See Selectors |
modelListeners | JavaScript object containing model paths and the listeners that are activated when changes happen to those paths. | Keys in the object are event names, values are functions or arrays of functions. | See Model |
Selectors
One of the options that can be provided to the First Discovery Editor is a set of CSS-based selectors identifying where in the DOM different elements can be found. The value for the option is itself a Javascript object containing name/value pairs:
selectors: { selector1Name: "selector 1 string", selector2Name: "selector 2 string", ... }
Selector Name | Description | Default |
---|---|---|
| The set of containers to use the Navigation Icons. | ".gpiic-fd-navIcon" |
pager | The container of the Navigation Icons. | ".gpii-fd-navIcon-outer" |
Dependencies
<script type="text/javascript" src="src/lib/infusion/infusion-custom.js"></script> <script type="text/javascript" src="src/js/navIcons.js"></script>