position

sets the position of the window relative to the the screen

string|function position;

Values

  • "center"
    places the window in the center of the viewport
  • "top"
    forces the window to appear from the top of the page with slide animation and horizontal centering
  • Example

    webix.ui({
        view:"window",
        position:"center",
        // window config
    }).show();

    Related samples

    Details

    The positioning function takes the default window position as a parameter and allows modifying its aspects.

    webix.ui({
        view:"window",
        head:"",
        body:{...},
        position:function(state){ 
            state.left = 20; // fixed values
            state.top = 20;
            state.width -=60; // relative values
            state.height +=60;
        }
    });

    The default window position is a top left corner of the viewport.

    See also
    Back to top
    If you have not checked yet, be sure to visit site of our main product Webix ui widget library and page of context menu javascript product.