mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 13:16:10 +03:00
Fix a bad merge of changelog.txt
This commit is contained in:
commit
69143f786b
@ -1,4 +1,5 @@
|
|||||||
# OpenSeadragon
|
# OpenSeadragon
|
||||||
|
[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/openseadragon/openseadragon?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||||
|
|
||||||
An open-source, web-based viewer for zoomable images, implemented in pure JavaScript.
|
An open-source, web-based viewer for zoomable images, implemented in pure JavaScript.
|
||||||
|
|
||||||
|
@ -15,6 +15,9 @@ OPENSEADRAGON CHANGELOG
|
|||||||
* Debug mode now works with rotate images (#453)
|
* Debug mode now works with rotate images (#453)
|
||||||
* Now supporting dzi xml with namespaces (#462)
|
* Now supporting dzi xml with namespaces (#462)
|
||||||
* You can now rotate the navigator along with the main viewer (#455)
|
* You can now rotate the navigator along with the main viewer (#455)
|
||||||
|
* Viewport.setRotation now allows all rotation angles (#466)
|
||||||
|
* Pinch rotate is now available (defaults to off) (#468)
|
||||||
|
* Added option for home button to fill viewer (#474)
|
||||||
|
|
||||||
1.1.1:
|
1.1.1:
|
||||||
|
|
||||||
|
@ -54,6 +54,7 @@ $.IIIFTileSource = function( options ){
|
|||||||
|
|
||||||
options.tileSizePerScaleFactor = {};
|
options.tileSizePerScaleFactor = {};
|
||||||
|
|
||||||
|
// N.B. 2.0 renamed scale_factors to scaleFactors
|
||||||
if ( this.tile_width ) {
|
if ( this.tile_width ) {
|
||||||
options.tileSize = this.tile_width;
|
options.tileSize = this.tile_width;
|
||||||
} else if ( this.tile_height ) {
|
} else if ( this.tile_height ) {
|
||||||
@ -62,13 +63,13 @@ $.IIIFTileSource = function( options ){
|
|||||||
// Version 2.0 forwards
|
// Version 2.0 forwards
|
||||||
if ( this.tiles.length == 1 ) {
|
if ( this.tiles.length == 1 ) {
|
||||||
options.tileSize = this.tiles[0].width;
|
options.tileSize = this.tiles[0].width;
|
||||||
this.scale_factors = this.tiles[0].scale_factors;
|
this.scale_factors = this.tiles[0].scaleFactors;
|
||||||
} else {
|
} else {
|
||||||
// Multiple tile sizes at different levels
|
// Multiple tile sizes at different levels
|
||||||
this.scale_factors = [];
|
this.scale_factors = [];
|
||||||
for (var t = 0; t < this.tiles.length; t++ ) {
|
for (var t = 0; t < this.tiles.length; t++ ) {
|
||||||
for (var sf = 0; sf < this.tiles[t].scale_factors.length; sf++) {
|
for (var sf = 0; sf < this.tiles[t].scaleFactors.length; sf++) {
|
||||||
var scaleFactor = this.tiles[t].scale_factors[sf];
|
var scaleFactor = this.tiles[t].scaleFactors[sf];
|
||||||
this.scale_factors.push(scaleFactor);
|
this.scale_factors.push(scaleFactor);
|
||||||
options.tileSizePerScaleFactor[scaleFactor] = this.tiles[t].width;
|
options.tileSizePerScaleFactor[scaleFactor] = this.tiles[t].width;
|
||||||
}
|
}
|
||||||
|
@ -221,6 +221,10 @@
|
|||||||
*
|
*
|
||||||
* @property {Number} [maxZoomLevel=null]
|
* @property {Number} [maxZoomLevel=null]
|
||||||
*
|
*
|
||||||
|
* @property {Boolean} [homeFillsViewer=false]
|
||||||
|
* Make the 'home' button fill the viewer and clip the image, instead
|
||||||
|
* of fitting the image to the viewer and letterboxing.
|
||||||
|
*
|
||||||
* @property {Boolean} [panHorizontal=true]
|
* @property {Boolean} [panHorizontal=true]
|
||||||
* Allow horizontal pan.
|
* Allow horizontal pan.
|
||||||
*
|
*
|
||||||
@ -912,6 +916,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,
|
||||||
|
@ -1937,7 +1937,8 @@ function openTileSource( viewer, source ) {
|
|||||||
degrees: _this.degrees //,
|
degrees: _this.degrees //,
|
||||||
//TODO: figure out how to support these in a way that makes sense
|
//TODO: figure out how to support these in a way that makes sense
|
||||||
//minZoomLevel: this.minZoomLevel,
|
//minZoomLevel: this.minZoomLevel,
|
||||||
//maxZoomLevel: this.maxZoomLevel
|
//maxZoomLevel: this.maxZoomLevel,
|
||||||
|
//homeFillsViewer: this.homeFillsViewer
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
if( source ){
|
if( source ){
|
||||||
@ -1958,7 +1959,8 @@ function openTileSource( viewer, source ) {
|
|||||||
maxZoomLevel: _this.maxZoomLevel,
|
maxZoomLevel: _this.maxZoomLevel,
|
||||||
viewer: _this,
|
viewer: _this,
|
||||||
degrees: _this.degrees,
|
degrees: _this.degrees,
|
||||||
navigatorRotate: _this.navigatorRotate
|
navigatorRotate: _this.navigatorRotate,
|
||||||
|
homeFillsViewer: _this.homeFillsViewer
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,7 +84,8 @@ $.Viewport = function( options ) {
|
|||||||
defaultZoomLevel: $.DEFAULT_SETTINGS.defaultZoomLevel,
|
defaultZoomLevel: $.DEFAULT_SETTINGS.defaultZoomLevel,
|
||||||
minZoomLevel: $.DEFAULT_SETTINGS.minZoomLevel,
|
minZoomLevel: $.DEFAULT_SETTINGS.minZoomLevel,
|
||||||
maxZoomLevel: $.DEFAULT_SETTINGS.maxZoomLevel,
|
maxZoomLevel: $.DEFAULT_SETTINGS.maxZoomLevel,
|
||||||
degrees: $.DEFAULT_SETTINGS.degrees
|
degrees: $.DEFAULT_SETTINGS.degrees,
|
||||||
|
homeFillsViewer: $.DEFAULT_SETTINGS.homeFillsViewer
|
||||||
|
|
||||||
}, options );
|
}, options );
|
||||||
|
|
||||||
@ -148,15 +149,21 @@ $.Viewport.prototype = /** @lends OpenSeadragon.Viewport.prototype */{
|
|||||||
* @function
|
* @function
|
||||||
*/
|
*/
|
||||||
getHomeZoom: function() {
|
getHomeZoom: function() {
|
||||||
var aspectFactor =
|
|
||||||
this.contentAspectX / this.getAspectRatio();
|
|
||||||
|
|
||||||
if( this.defaultZoomLevel ){
|
if( this.defaultZoomLevel ){
|
||||||
return this.defaultZoomLevel;
|
return this.defaultZoomLevel;
|
||||||
} else {
|
} else {
|
||||||
return ( aspectFactor >= 1 ) ?
|
var aspectFactor =
|
||||||
1 :
|
this.contentAspectX / this.getAspectRatio();
|
||||||
aspectFactor;
|
|
||||||
|
if( this.homeFillsViewer ){ // fill the viewer and clip the image
|
||||||
|
return ( aspectFactor >= 1) ?
|
||||||
|
aspectFactor :
|
||||||
|
1;
|
||||||
|
} else {
|
||||||
|
return ( aspectFactor >= 1 ) ?
|
||||||
|
1 :
|
||||||
|
aspectFactor;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
"protocol": "http://iiif.io/api/image",
|
"protocol": "http://iiif.io/api/image",
|
||||||
"height": 1024,
|
"height": 1024,
|
||||||
"width": 775,
|
"width": 775,
|
||||||
"tiles" : [{"width":256, "scale_factors":[1,2,4,8]}],
|
"tiles" : [{"width":256, "scaleFactors":[1,2,4,8]}],
|
||||||
|
|
||||||
"profile": ["http://iiif.io/api/image/2/level1.json",
|
"profile": ["http://iiif.io/api/image/2/level1.json",
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user