API Docs for: 1.0.0
Show:

eLabSDK.GUI.Button Class

Extends eLabSDK.GUI
Module: eLabSDK

Creates a GUI button

Constructor

eLabSDK.GUI.Button

(
  • object
)

Parameters:

  • object Object
    • label String
    • icon String
      • Font-Awesome class name, i.e. fa-gears
    • action Function

Example:

 var button = new eLabSDK.GUI.Button({
                 label: 'My New Feature',
                 action: function(){
                     alert('Thank you for using this custom feature');
                 }
               });

types: default || highlight || confirm || decline || remove || success || warning

Item Index

Methods

action

()

Triggers the associated action

addCounter

()

Adds a counter to the rendered button

Returns:

null

Example:

button.addCounter({ 
    'class': 'className', // optional
    value:'100', //static value
    source: '' // or load from server by adding a api call
}); 

render

() Object

Renders the button

Returns:

Object:

JQuery Object

Example:

 var $btn = button.render();
 $('#MyTargetDiv').append($btn);