getVerticalAlignment();
The getVerticalAlignment method returns the current vertical position of the timeline.
Returns enumeration item VerticalAlignment.
To execute the example the page must contain the MapChart component named map (see Map Layout on HTML Page) for which a timeline is set up (see Example of Timeline Setup). Add a button clicking which shows the map legend:
var button = new PP.Ui.Button({
ParentNode: document.getElementById("div2"),
Content: "Show legend",
Click: function (sender, args) {
var tl = map.getTimeline()
tlALign = tl.getVerticalAlignment();
var legend = map.getLegends().legend1;
if (tlALign = "Bottom") { legend.setVerticalAlignment("Top") }
legend.show()
}
})
After executing the example the Show Legend button is placed on the page. Clicking this button shows the legend. If the timeline is positioned at the page bottom, the legend is shown at the top of the page.