mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 13:16:10 +03:00
Documentation comments
This commit is contained in:
parent
84dc60632c
commit
194d1c0606
@ -1522,7 +1522,9 @@ $.Viewport.prototype = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Toggle flip state and demands a new drawing on navigator and viewer objects.
|
* Toggles flip state and demands a new drawing on navigator and viewer objects.
|
||||||
|
* @function
|
||||||
|
* @return {OpenSeadragon.Viewport} Chainable.
|
||||||
*/
|
*/
|
||||||
toggleFlip: function() {
|
toggleFlip: function() {
|
||||||
this.setFlip(!this.getFlip());
|
this.setFlip(!this.getFlip());
|
||||||
@ -1530,14 +1532,42 @@ $.Viewport.prototype = {
|
|||||||
this.viewer.navigator.setFlip();
|
this.viewer.navigator.setFlip();
|
||||||
}
|
}
|
||||||
this.viewer.forceRedraw();
|
this.viewer.forceRedraw();
|
||||||
|
return this;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets flip state stored on viewport.
|
||||||
|
* @function
|
||||||
|
* @return {Boolean} Flip state.
|
||||||
|
*/
|
||||||
getFlip: function() {
|
getFlip: function() {
|
||||||
return this.flipped;
|
return this.flipped;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets flip state according to the state input argument.
|
||||||
|
* @function
|
||||||
|
* @return {OpenSeadragon.Viewport} Chainable.
|
||||||
|
*/
|
||||||
setFlip: function( state ) {
|
setFlip: function( state ) {
|
||||||
|
if ( this.flipped != state ) {
|
||||||
|
/**
|
||||||
|
* Raised when flip state has been changed.
|
||||||
|
*
|
||||||
|
* @event flip
|
||||||
|
* @memberof OpenSeadragon.Viewer
|
||||||
|
* @type {object}
|
||||||
|
* @property {OpenSeadragon.Viewer} eventSource - A reference to the Viewer which raised the event.
|
||||||
|
* @property {Number} flipped - The flip state after this change.
|
||||||
|
* @property {?Object} userData - Arbitrary subscriber-defined object.
|
||||||
|
*/
|
||||||
|
this.viewer.raiseEvent('flip', {"flipped": state});
|
||||||
|
}
|
||||||
|
|
||||||
this.flipped = state;
|
this.flipped = state;
|
||||||
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user