Rename IIIFInfo format methods for more clarity
This commit is contained in:
@@ -16,7 +16,7 @@ const layer = new TileLayer(),
|
||||
function refreshMap(imageInfoUrl) {
|
||||
fetch(imageInfoUrl).then(function(response) {
|
||||
response.json().then(function(imageInfo) {
|
||||
const options = new IIIFInfo().readFromJson(imageInfo);
|
||||
const options = new IIIFInfo().readOptionsFromJson(imageInfo);
|
||||
if (options === undefined || options.version === undefined) {
|
||||
notifyDiv.textContent = 'Data seems to be no valid IIIF image information.';
|
||||
return;
|
||||
|
||||
@@ -278,7 +278,7 @@ class IIIFInfo {
|
||||
* @param {PreferredOptions} opt_preferredOptions Optional options for preferred format and quality.
|
||||
* @returns {import("../source/IIIF.js").Options} IIIF tile source ready constructor options.
|
||||
*/
|
||||
readFromJson(imageInfo, opt_preferredOptions) {
|
||||
readOptionsFromJson(imageInfo, opt_preferredOptions) {
|
||||
return getOptionsForImageInformation(imageInfo, opt_preferredOptions);
|
||||
}
|
||||
|
||||
@@ -287,7 +287,7 @@ class IIIFInfo {
|
||||
* @param {PreferredOptions} opt_preferredOptions Optional options for preferred format and quality.
|
||||
* @returns {import("../source/IIIF.js").Options} IIIF tile source ready constructor options.
|
||||
*/
|
||||
readFromJsonString(imageInfo, opt_preferredOptions) {
|
||||
readOptionsFromJsonString(imageInfo, opt_preferredOptions) {
|
||||
return getOptionsForImageInformation(JSON.parse(imageInfo), opt_preferredOptions);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user