AnimationSettings(useAnimation: Boolean, animationTime: Number);
useAnimation. Indicates if component uses animation. If this parameter is set to True, animation is used in the component, otherwise it is not.
animationTime. Animation duration in milliseconds.
The AnimationSettings method creates an instance of the AnimationSettings class.
To execute the example, the HTML page must contain links to the PP.js scenario file and the PP.css styles file. Create a navigation bar with two tabs and set up animation parameters for this bar:
// Set animation time 3000 ms var animation = new PP.AnimationSettings(True, 3000); // Create a navigation panel with two tabs var bar = new PP.Ui.NavigationBar({ Items: [new PP.Ui.NavigationItem({ Title: "a1", Height: 100 }), new PP.Ui.NavigationItem({ Title: "a2" }) ], Animation: animation, // Specify animation settings Width: 150, Height: 150 }); // Add a navigation panel to the page bar.addToNode(document.body);
After executing the example a navigation bar with two tabs is created. Animation time on opening navigation bar tabs is set to 3,000 milliseconds:
See also: