diff --git a/test/demo/m2/README.md b/test/demo/m2/README.md index ef92c45c..0d16eac8 100644 --- a/test/demo/m2/README.md +++ b/test/demo/m2/README.md @@ -1,4 +1,7 @@ # To Do * Support 400+ page collections +* Choosing between multiple versions of a page +* Detail images overlaid on the page +* Cropped images * Show/hide pages? diff --git a/test/demo/m2/js/main.js b/test/demo/m2/js/main.js index 76448fe0..85bbae3d 100644 --- a/test/demo/m2/js/main.js +++ b/test/demo/m2/js/main.js @@ -57,10 +57,10 @@ }); this.viewer.addHandler('canvas-drag', function() { - if (this.mode === 'scroll') { - var result = this.hitTest(this.viewer.viewport.getCenter()); + if (self.mode === 'scroll') { + var result = self.hitTest(self.viewer.viewport.getCenter()); if (result) { - this.page = result.index; + self.page = result.index; } } }); @@ -267,7 +267,8 @@ } if (x !== center.x || y !== center.y) { - this.viewer.viewport.panTo(new OpenSeadragon.Point(x, y), true); + this.viewer.viewport.centerSpringX.current.value = x; + this.viewer.viewport.centerSpringY.current.value = y; } } },