Incorporate code review feedback for Openseadragon isue 127. Added appropriate default values and docs to openseadragon.js; restored a blank line that I accidentally deleted.

This commit is contained in:
nein09 2014-09-12 10:33:48 -07:00
parent f0f6e93915
commit 2712484e1e
2 changed files with 28 additions and 26 deletions

View File

@ -912,6 +912,7 @@ window.OpenSeadragon = window.OpenSeadragon || function( options ){
defaultZoomLevel: 0, defaultZoomLevel: 0,
minZoomLevel: null, minZoomLevel: null,
maxZoomLevel: null, maxZoomLevel: null,
homeFillsViewer: false,
//UI RESPONSIVENESS AND FEEL //UI RESPONSIVENESS AND FEEL
clickTimeThreshold: 300, clickTimeThreshold: 300,

View File

@ -174,6 +174,7 @@ $.Viewport.prototype = /** @lends OpenSeadragon.Viewport.prototype */{
var center = this.homeBounds.getCenter( ), var center = this.homeBounds.getCenter( ),
width = 1.0 / this.getHomeZoom( ), width = 1.0 / this.getHomeZoom( ),
height = width / this.getAspectRatio(); height = width / this.getAspectRatio();
return new $.Rect( return new $.Rect(
center.x - ( width / 2.0 ), center.x - ( width / 2.0 ),
center.y - ( height / 2.0 ), center.y - ( height / 2.0 ),