From 222f94275223092c0adc7d5f084fb4dd63673263 Mon Sep 17 00:00:00 2001 From: Ian Gilman Date: Thu, 4 Dec 2014 13:36:02 -0800 Subject: [PATCH 1/2] Animation demo --- test/demo/item-animation.html | 80 +++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 test/demo/item-animation.html diff --git a/test/demo/item-animation.html b/test/demo/item-animation.html new file mode 100644 index 00000000..27d3540f --- /dev/null +++ b/test/demo/item-animation.html @@ -0,0 +1,80 @@ + + + + OpenSeadragon Collections Demo + + + + + + +
+ + From 549ce6423817391f98932811ce06ba58d7b5d7eb Mon Sep 17 00:00:00 2001 From: Ian Gilman Date: Fri, 5 Dec 2014 11:05:50 -0800 Subject: [PATCH 2/2] Using highsmith for animation demo --- test/demo/item-animation.html | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/test/demo/item-animation.html b/test/demo/item-animation.html index 27d3540f..a6cbf3a6 100644 --- a/test/demo/item-animation.html +++ b/test/demo/item-animation.html @@ -30,20 +30,36 @@ this.index = 0; + var tileSource = { + Image: { + xmlns: "http://schemas.microsoft.com/deepzoom/2008", + Url: "http://openseadragon.github.io/example-images/highsmith/highsmith_files/", + Format: "jpg", + Overlap: "2", + TileSize: "256", + Size: { + Height: "9221", + Width: "7026" + } + } + }; + var tileSources = []; for (var i = 0; i < this.itemCount; i++) { - tileSources.push('../data/testpattern.dzi'); + tileSources.push(tileSource); } this.viewer = OpenSeadragon({ - showNavigationControl: false, - mouseNavEnabled: false, id: "contentDiv", prefixUrl: "../../build/openseadragon/images/", tileSources: tileSources }); this.viewer.addHandler('open', function() { + self.viewer.viewport.fitBounds(new OpenSeadragon.Rect(0, 0, + self.positionRange + self.sizeRange, + self.positionRange + self.sizeRange)); + self.animate(); }); }, @@ -59,7 +75,6 @@ item.setWidth(Math.random() * this.sizeRange); this.index = (this.index + 1) % this.viewer.world.getItemCount(); - this.viewer.viewport.goHome(); setTimeout(function() { self.animate();