From e69b15d33ed7ff6261503836d1adf93daf56c55b Mon Sep 17 00:00:00 2001 From: engsterhold <24939343+engsterhold@users.noreply.github.com> Date: Thu, 16 May 2019 16:10:58 +0200 Subject: [PATCH 1/3] Bandaid fix for change in Zoomify.js/CustomTile signature The recent addition of tilePixelRatio to the Zoomify.js/CustomTile constructor broke parameter binding in IIIF.js/IIIF. The fix mirrors the change in the Zoomify.js/Zoomify constructor --- src/ol/source/IIIF.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ol/source/IIIF.js b/src/ol/source/IIIF.js index 4152ed8bc8..e2f6eee31c 100644 --- a/src/ol/source/IIIF.js +++ b/src/ol/source/IIIF.js @@ -75,6 +75,7 @@ class IIIF extends TileImage { const width = size[0]; const height = size[1]; const tileSize = options.tileSize; + const tilePixelRatio = options.tilePixelRatio || 1; const format = options.format || 'jpg'; const quality = options.quality || (options.version == Versions.VERSION1 ? 'native' : 'default'); let resolutions = options.resolutions || []; @@ -259,8 +260,8 @@ class IIIF extends TileImage { } return baseUrl + regionParam + '/' + sizeParam + '/0/' + quality + '.' + format; }; - - const IiifTileClass = CustomTile.bind(null, tileGrid); + + const IiifTileClass = CustomTile.bind(null, tilePixelRatio, tileGrid); super({ attributions: options.attributions, From f77b0941b8c1dda6329ae51fd7a010a5a6d2b1ac Mon Sep 17 00:00:00 2001 From: engsterhold <24939343+engsterhold@users.noreply.github.com> Date: Fri, 17 May 2019 13:52:10 +0200 Subject: [PATCH 2/3] fixed styling --- src/ol/source/IIIF.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ol/source/IIIF.js b/src/ol/source/IIIF.js index e2f6eee31c..ff8c450d78 100644 --- a/src/ol/source/IIIF.js +++ b/src/ol/source/IIIF.js @@ -260,8 +260,8 @@ class IIIF extends TileImage { } return baseUrl + regionParam + '/' + sizeParam + '/0/' + quality + '.' + format; }; - - const IiifTileClass = CustomTile.bind(null, tilePixelRatio, tileGrid); + + const IiifTileClass = CustomTile.bind(null, tilePixelRatio, tileGrid); super({ attributions: options.attributions, From 7e4e113ac9b40f5abdf3f80f7727638308ae115d Mon Sep 17 00:00:00 2001 From: robert <24939343+engsterhold@users.noreply.github.com> Date: Tue, 21 May 2019 12:32:30 +0200 Subject: [PATCH 3/3] lint fix Signed-off-by: robert <24939343+engsterhold@users.noreply.github.com> --- src/ol/source/IIIF.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ol/source/IIIF.js b/src/ol/source/IIIF.js index ff8c450d78..7989a96768 100644 --- a/src/ol/source/IIIF.js +++ b/src/ol/source/IIIF.js @@ -260,7 +260,7 @@ class IIIF extends TileImage { } return baseUrl + regionParam + '/' + sizeParam + '/0/' + quality + '.' + format; }; - + const IiifTileClass = CustomTile.bind(null, tilePixelRatio, tileGrid); super({