Have questions? Stuck? Please check our FAQ for some common questions and answers.

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

ToolbarService

ToolbarService is an Angular Factory in the Widget module with the name toolbar.js. It allows you to create a basic toolbar with controls and buttons. To use these functions, see the documentation on injecting Angular services.

An example of a toolbar is on the Topology View.

 

NameSummary
createToolbarCreate a toolbar basic toolbar.
destroyToolbarDestroy an already-created toolbar.

Function Descriptions

createToolbar

Example UsageArgumentsReturn Value
tbs.createToolbar(id, opts);

id - string of a globally unique ID for the toolbar

opts - an object that can overwrite default settings * for the toolbar

 

* The default settings for the toolbar are as follows:

defaultSettings = {
    edge: 'left',        // edge of the window the toolbar is on
    width: 20,           // default width of the toolbar with no buttons
    margin: 0,           // gap between the toolbar and the edge of the window
    hideMargin: -20,     // how much of the toolbar should be shown when the toolbar is hidden
    top: 'auto',         // 'top' CSS style for positioning
    bottom: '10px',      // 'bottom' CSS style for positioning
    fade: false,         // boolean of whether the toolbar will fade in and fade out
    shown: false         // boolean of whether the toolbar is shown initially
};

 

destroyToolbar

 

 

 

  • No labels