getLayoutView

returns the object of the layout view by its name

object getLayoutView(string name);
namestringthe name of the layout view
objectthe object of the layout view

Example

gantt.getLayoutView("resourceTimeline").posFromDate(new Date(2025, 05, 08));
// returns 210
 
gantt.getLayoutView("resourceTimeline").dateFromPos(210);
// returns 08 June, 2025

Details

The method allows applying some methods to the returned object of the layout view. The methods are:

  • dateFromPos - gets the date of the specified horizontal position in the view
  • posFromDate - gets the relative horizontal position of the specified date in the view
  • getScale - returns the configuration of the time scale of the view

To scroll the view to the specified position, apply the scrollLayoutCell method.

Related sample:  Public methods to get the layout cell views and scroll them

See also
  • Articles
  • Back to top