PP.Ui.rotateNode(node: HTMLElement, angle: Number);
node. HTML Item.
angle. Rotation angle value (in degrees).
The rotateNode method rotate the HTML item at the specified angle.
To execute the example, the HTML page must contain links to PP.js script file and to PP.css styles file in the <body> tag of the HTML page of the <div> item with the button identifier. In the onload event of the <body> tag it is necessary to specify the call of the createButton() function. Add the button on the page and rotate it at 15 degrees:
var button; function createButton() { // Create button button = new PP.Ui.Button({ // Set parent item ParentNode: document.getElementById("button"), // Set button contents Content: "Button", }); } // Rotate the button at 10 degrees PP.Ui.rotateNode(button.getDomNode(), 10);
As a result the button is rotated at 10 degrees:
See also: