mirror of
https://github.com/openseadragon/openseadragon.git
synced 2025-01-20 01:31:45 +03:00
added documentation to getConstrainedBounds
This commit is contained in:
parent
ac18d5629d
commit
aede32c335
@ -616,7 +616,7 @@ $.Viewport.prototype = {
|
|||||||
* @function
|
* @function
|
||||||
* @param {Boolean} [immediately=false]
|
* @param {Boolean} [immediately=false]
|
||||||
* @returns {OpenSeadragon.Viewport} Chainable.
|
* @returns {OpenSeadragon.Viewport} Chainable.
|
||||||
* @fires OpenSeadragon.Viewer.event:constrain
|
* @fires OpenSeadragon.Viewer.event:constrain if the
|
||||||
*/
|
*/
|
||||||
applyConstraints: function(immediately) {
|
applyConstraints: function(immediately) {
|
||||||
var actualZoom = this.getZoom();
|
var actualZoom = this.getZoom();
|
||||||
@ -627,10 +627,10 @@ $.Viewport.prototype = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var constrainedBounds = this.getConstrainedBounds(false);
|
var constrainedBounds = this.getConstrainedBounds(false);
|
||||||
this._raiseConstraintsEvent(immediately);
|
|
||||||
|
|
||||||
if(constrainedBounds.constraintApplied){
|
if(constrainedBounds.constraintApplied){
|
||||||
this.fitBounds(constrainedBounds, immediately);
|
this.fitBounds(constrainedBounds, immediately);
|
||||||
|
this._raiseConstraintsEvent(immediately);
|
||||||
}
|
}
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
@ -794,7 +794,9 @@ $.Viewport.prototype = {
|
|||||||
* Returns bounds taking constraints into account
|
* Returns bounds taking constraints into account
|
||||||
* Added to improve constrained panning
|
* Added to improve constrained panning
|
||||||
* @param {Boolean} current - Pass true for the current location; defaults to false (target location).
|
* @param {Boolean} current - Pass true for the current location; defaults to false (target location).
|
||||||
* @returns {OpenSeadragon.Viewport} Chainable.
|
* @returns {OpenSeadragon.Rect} The bounds after applying constraints. The returned $.Rect contains additonal
|
||||||
|
* properties xConstrained, yConstrained, constraintsApplied indicating the status
|
||||||
|
* of the constraining operation; x and y are in the viewer element coordinate system.
|
||||||
*/
|
*/
|
||||||
getConstrainedBounds: function(current) {
|
getConstrainedBounds: function(current) {
|
||||||
var bounds,
|
var bounds,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user