moveView

moves a view to a new position and updates its sizes

void moveView(string|number id,object pos);
idstring|numberthe id of a view
posobjectan object with new view position

Example

webix.ui({
    view:"gridlayout", 
    id:"grid",
    gridColumns:4, gridRows:3,
    cells:[
        { id:"a", template:"Single", x:0, y:0, dx:1, dy:1 }
        // more cells       
    ]
});
 
$$("grid").moveView("a", { x:0, y:0, dx:2, dy:2 });

Related samples

Details

A new configuration object of a view has the following attributes:

  • x - (number) the x-index of a grid cell starting point
  • y - (number) the y-index of a grid cell starting point
  • dx - (number) the width of a view defined as a number of grid cells
  • dy - (number) the height of a view defined as a number of grid cells
See also
Back to top