From 820cdb90f8c7bffa33494781a2ca86eaf0f6dac2 Mon Sep 17 00:00:00 2001 From: abraham lam Date: Sun, 9 Aug 2020 21:33:17 -0400 Subject: [PATCH 1/3] tileSize is no longer hard corded in Zoomify Tile Source --- src/zoomifytilesource.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/zoomifytilesource.js b/src/zoomifytilesource.js index 743c2c1b..3cf48071 100644 --- a/src/zoomifytilesource.js +++ b/src/zoomifytilesource.js @@ -18,7 +18,7 @@ * tilesUrl: "/test/data/zoomify/" * } * - * The tileSize is currently hardcoded to 256 (the usual Zoomify default). The tileUrl must the path to the image _directory_. + * The tileSize is set to 256 (the usual Zoomify default) when it is not defined. The tileUrl must the path to the image _directory_. * * 2) Loading image metadata from xml file: (CURRENTLY NOT SUPPORTED) * @@ -44,7 +44,9 @@ * @param {String} tilesUrl */ $.ZoomifyTileSource = function(options) { - options.tileSize = 256; + if(options.tileSize === undefined){ + options.tileSize = 256; + } var currentImageSize = { x: options.width, From 47463161b402b7bc2a7e347ec9ff22928ba3a620 Mon Sep 17 00:00:00 2001 From: abraham lam Date: Mon, 10 Aug 2020 11:22:19 -0400 Subject: [PATCH 2/3] revised tileSize check as suggested by @msalsbery --- src/zoomifytilesource.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zoomifytilesource.js b/src/zoomifytilesource.js index 3cf48071..7b62a6a8 100644 --- a/src/zoomifytilesource.js +++ b/src/zoomifytilesource.js @@ -44,7 +44,7 @@ * @param {String} tilesUrl */ $.ZoomifyTileSource = function(options) { - if(options.tileSize === undefined){ + if(typeof options.tileSize === 'undefined'){ options.tileSize = 256; } From 5ea41bd346c1127adae3c15c64bd7ea4de23bb9d Mon Sep 17 00:00:00 2001 From: abraham lam Date: Tue, 11 Aug 2020 18:12:54 -0400 Subject: [PATCH 3/3] Change log for #1704 --- changelog.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/changelog.txt b/changelog.txt index 11ca2b6d..04374697 100644 --- a/changelog.txt +++ b/changelog.txt @@ -7,6 +7,7 @@ OPENSEADRAGON CHANGELOG * Documentation fix (#1814 @kenanchristian) * Better cleanup on destruction, to avoid memory leaks (#1832 @JoFrMueller) * Miscellaneous code cleanup (#1840 @msalsbery) +* tileSize is no longer hard corded in Zoomify Tile Source (#1704) 2.4.2: