From f5879fdadd46251d93fedddbabc73a4f81ce1d4b Mon Sep 17 00:00:00 2001 From: yulgit1 Date: Wed, 29 Oct 2014 17:04:57 -0400 Subject: [PATCH] Update IIIFBookReader.js un-hardcode numLeafs and make it the number of canvases in manifest --- example/js/lib/IIIFBookReader.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/js/lib/IIIFBookReader.js b/example/js/lib/IIIFBookReader.js index aba8379..952d4f3 100644 --- a/example/js/lib/IIIFBookReader.js +++ b/example/js/lib/IIIFBookReader.js @@ -131,7 +131,7 @@ jQuery.each(brInstance.jsonLd.sequences, function(index, sequence) { if (sequence['@id'] === sequenceId) { brInstance.IIIFsequence.title = "here's a sequence"; - brInstance.numLeafs = 515; + brInstance.numLeafs = this.canvases.length; brInstance.IIIFsequence.bookUrl = "http://iiif.io"; brInstance.IIIFsequence.imagesList = getImagesList(sequence); }