VintaSoft Imaging .NET SDK 14.0: Documentation for Web developer
Vintasoft.Imaging.UI.Panels Namespace / WebUiMenuJS type / WebUiMenuJS Constructor(string[],object,string)
Syntax BrowserCompatibility SeeAlso
In This Topic
    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(
    items
    An array of identifiers of WebUiElementJS objects, which must be placed in menu.
    : string[],
    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.
    : object,
    stateButton
    A string identiifier of button, which allows to change the menu state.
    : 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
    56+
    45+
    11
    See Also