Merge pull request #1698 from alvaromartmart/master

Added missing Rect.degrees and Viewport.setRotation(degrees) documentation
This commit is contained in:
Ian Gilman 2019-08-19 10:36:30 -07:00 committed by GitHub
commit bb559d064d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 0 deletions

View File

@ -78,6 +78,11 @@ $.Rect = function(x, y, width, height, degrees) {
*/
this.height = typeof (height) === "number" ? height : 0;
/**
* The rotation of the rectangle, in degrees.
* @member {Number} degrees
* @memberof OpenSeadragon.Rect#
*/
this.degrees = typeof (degrees) === "number" ? degrees : 0;
// Normalizes the rectangle.

View File

@ -875,6 +875,7 @@ $.Viewport.prototype = {
/**
* Rotates this viewport to the angle specified.
* @function
* @param {Number} degrees The degrees to set the rotation to.
* @return {OpenSeadragon.Viewport} Chainable.
*/
setRotation: function(degrees) {