mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-29 00:26:10 +03:00
Merge pull request #538 from openseadragon/ian2
Using highsmith for animation demo
This commit is contained in:
commit
d85d4d492d
@ -30,20 +30,36 @@
|
|||||||
|
|
||||||
this.index = 0;
|
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 = [];
|
var tileSources = [];
|
||||||
for (var i = 0; i < this.itemCount; i++) {
|
for (var i = 0; i < this.itemCount; i++) {
|
||||||
tileSources.push('../data/testpattern.dzi');
|
tileSources.push(tileSource);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.viewer = OpenSeadragon({
|
this.viewer = OpenSeadragon({
|
||||||
showNavigationControl: false,
|
|
||||||
mouseNavEnabled: false,
|
|
||||||
id: "contentDiv",
|
id: "contentDiv",
|
||||||
prefixUrl: "../../build/openseadragon/images/",
|
prefixUrl: "../../build/openseadragon/images/",
|
||||||
tileSources: tileSources
|
tileSources: tileSources
|
||||||
});
|
});
|
||||||
|
|
||||||
this.viewer.addHandler('open', function() {
|
this.viewer.addHandler('open', function() {
|
||||||
|
self.viewer.viewport.fitBounds(new OpenSeadragon.Rect(0, 0,
|
||||||
|
self.positionRange + self.sizeRange,
|
||||||
|
self.positionRange + self.sizeRange));
|
||||||
|
|
||||||
self.animate();
|
self.animate();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -59,7 +75,6 @@
|
|||||||
item.setWidth(Math.random() * this.sizeRange);
|
item.setWidth(Math.random() * this.sizeRange);
|
||||||
|
|
||||||
this.index = (this.index + 1) % this.viewer.world.getItemCount();
|
this.index = (this.index + 1) % this.viewer.world.getItemCount();
|
||||||
this.viewer.viewport.goHome();
|
|
||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
self.animate();
|
self.animate();
|
||||||
|
Loading…
Reference in New Issue
Block a user