mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-24 14:16:10 +03:00
use === and !==
This commit is contained in:
parent
e4987f9701
commit
b38f5d609b
@ -365,7 +365,7 @@ $.extend( $.IIIFTileSource.prototype, $.TileSource.prototype, /** @lends OpenSea
|
|||||||
iiifQuality = "default." + this.usedFormat;
|
iiifQuality = "default." + this.usedFormat;
|
||||||
}
|
}
|
||||||
if ( levelWidth < tileWidth && levelHeight < tileHeight ){
|
if ( levelWidth < tileWidth && levelHeight < tileHeight ){
|
||||||
if ( isv1 || levelWidth != this.width ) {
|
if ( isv1 || levelWidth !== this.width ) {
|
||||||
iiifSize = levelWidth + ",";
|
iiifSize = levelWidth + ",";
|
||||||
} else {
|
} else {
|
||||||
iiifSize = "max";
|
iiifSize = "max";
|
||||||
@ -376,13 +376,13 @@ $.extend( $.IIIFTileSource.prototype, $.TileSource.prototype, /** @lends OpenSea
|
|||||||
iiifTileY = y * iiifTileSizeHeight;
|
iiifTileY = y * iiifTileSizeHeight;
|
||||||
iiifTileW = Math.min( iiifTileSizeWidth, this.width - iiifTileX );
|
iiifTileW = Math.min( iiifTileSizeWidth, this.width - iiifTileX );
|
||||||
iiifTileH = Math.min( iiifTileSizeHeight, this.height - iiifTileY );
|
iiifTileH = Math.min( iiifTileSizeHeight, this.height - iiifTileY );
|
||||||
if ( x == 0 && y == 0 && iiifTileW == this.width && iiifTileH == this.height ) {
|
if ( x === 0 && y === 0 && iiifTileW === this.width && iiifTileH === this.height ) {
|
||||||
iiifRegion = "full";
|
iiifRegion = "full";
|
||||||
} else {
|
} else {
|
||||||
iiifRegion = [ iiifTileX, iiifTileY, iiifTileW, iiifTileH ].join( ',' );
|
iiifRegion = [ iiifTileX, iiifTileY, iiifTileW, iiifTileH ].join( ',' );
|
||||||
}
|
}
|
||||||
iiifSizeW = Math.ceil( iiifTileW * scale );
|
iiifSizeW = Math.ceil( iiifTileW * scale );
|
||||||
if ( (!isv1) && iiifSizeW == this.width ) {
|
if ( (!isv1) && iiifSizeW === this.width ) {
|
||||||
iiifSize = "max";
|
iiifSize = "max";
|
||||||
} else {
|
} else {
|
||||||
iiifSize = iiifSizeW + ",";
|
iiifSize = iiifSizeW + ",";
|
||||||
@ -407,10 +407,10 @@ $.extend( $.IIIFTileSource.prototype, $.TileSource.prototype, /** @lends OpenSea
|
|||||||
"http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level0",
|
"http://library.stanford.edu/iiif/image-api/1.1/compliance.html#level0",
|
||||||
"http://iiif.io/api/image/2/level0.json"
|
"http://iiif.io/api/image/2/level0.json"
|
||||||
];
|
];
|
||||||
var isLevel0 = (level0Profiles.indexOf(profile[0]) != -1);
|
var isLevel0 = (level0Profiles.indexOf(profile[0]) !== -1);
|
||||||
var hasSizeByW = false;
|
var hasSizeByW = false;
|
||||||
if ( profile.length > 1 && profile[1].supports ) {
|
if ( profile.length > 1 && profile[1].supports ) {
|
||||||
hasSizeByW = profile[1].supports.indexOf( "sizeByW" ) != -1;
|
hasSizeByW = profile[1].supports.indexOf( "sizeByW" ) !== -1;
|
||||||
}
|
}
|
||||||
return !isLevel0 || hasSizeByW;
|
return !isLevel0 || hasSizeByW;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user