diff --git a/melpomene.js b/melpomene.js index d76678f..4ad7a55 100644 --- a/melpomene.js +++ b/melpomene.js @@ -45,7 +45,7 @@ const VERSION_DISPLAY = document.getElementById("melpomene-version"); var PAGES_ZOOMS; // The variable ZOOMS can either be defined by another JS file or contructed at init -if (typeof PAGES_ZOOMS === 'undefined') +if (typeof PAGES_ZOOMS === "undefined") { PAGES_ZOOMS = null; } @@ -138,7 +138,7 @@ function globalZoomOffsetX() { if (READER_PAGES.dataset.globalZoomOffset !== undefined) { - return parseFloat(READER_PAGES.dataset.globalZoomOffset.split(',')[0]); + return parseFloat(READER_PAGES.dataset.globalZoomOffset.split(",")[0]); } return 0.0; @@ -148,7 +148,7 @@ function globalZoomOffsetY() { if (READER_PAGES.dataset.globalZoomOffset !== undefined) { - return parseFloat(READER_PAGES.dataset.globalZoomOffset.split(',')[1]); + return parseFloat(READER_PAGES.dataset.globalZoomOffset.split(",")[1]); } return 0.0; @@ -166,11 +166,11 @@ function loadZoomsFromImgTagsIfRequired() { const zoomsRawData = READER_PAGES.children[idx].dataset.zooms; - // ';' separates zooms data, ',' separates values + // ";" separates zooms data, "," separates values // We add the page number (adding 1 because of indexing) const zooms = zoomsRawData.split(";").map( zoom => [idx + 1].concat( - zoom.split(',').map( + zoom.split(",").map( value => parseFloat(value) ) )