WebUiMenuJS Constructor(string[],object,string)
In This Topic
Initializes a new instance of the
WebUiMenuJS class.
Syntax
// Parameters
var items; // Type: string[]
var settings; // Type: object
var stateButton; // Type: string
var instance = new Vintasoft.Imaging.UI.Panels.WebUiMenuJS(items, settings, stateButton);
function WebUiMenuJS(
: string[],
: object,
: string
) : WebUiMenuJS;
Parameters
- items
- An array of identifiers of WebUiElementJS objects, which must be placed in menu.
- settings
- The settings of panel. The settings parameter has the following properties:
- cssClass (string): CSS class or classes that will be applied to the element. Example: "cssClass:'mainMenu'".
- css (object): Object, which contains the names and values of CSS properties. Example: "css:{'width':'100px', 'height':'50px'}".
- properties (object): Object, which contains the names and values of element attributes.
- events (object): Object, which contains the callbacks of events. Each object property has the following parameters:
- Property name - event name (Example: "click", "change", "mouseover" etc ).
- Property value - event callback OR object - {callback:callback, data: Object, that contains additional data that will be passed to the callback}.
Example:"events:{'click':function(){console.log('click');}, 'change':{callback:function(){console.log('change');}, data:{x:11} } }". - id (string): Shortcut for 'id' attribute of element (equals - "properties:{'id':'elementId'}").
- localizationId (string): Unique localization ID.
- stateButton
- A string identiifier of button, which allows to change the menu state.
Browser Compatibility
See Also