getLayoutView
Description
Returns the object of the layout view by its name
getLayoutView: (name: string) => any
Parameters
name- (required) string - the name of the layout view
Returns
view- (object) - the 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.