mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 05:06:09 +03:00
Documentation comments
This commit is contained in:
parent
84dc60632c
commit
194d1c0606
@ -1522,22 +1522,52 @@ $.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() {
|
||||
this.setFlip(!this.getFlip());
|
||||
if(this.viewer.navigator){
|
||||
this.viewer.navigator.setFlip();
|
||||
}
|
||||
this.viewer.forceRedraw();
|
||||
return this;
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Gets flip state stored on viewport.
|
||||
* @function
|
||||
* @return {Boolean} Flip state.
|
||||
*/
|
||||
getFlip: function() {
|
||||
return this.flipped;
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Sets flip state according to the state input argument.
|
||||
* @function
|
||||
* @return {OpenSeadragon.Viewport} Chainable.
|
||||
*/
|
||||
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;
|
||||
return this;
|
||||
}
|
||||
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user