thatcher / openseadragon

This project has moved to its new github organization at github.com/openseadragon, please join us!
http://openseadragon,github.com/
37 stars 14 forks source link

Full Page / DZI not working #19

Closed malaterre closed 11 years ago

malaterre commented 12 years ago

For some reason I keep getting an error when doing full page and DZI images. Code is:

    <script type="text/javascript" src="openseadragon.js"/>
    <script type="text/javascript">
        var viewer = null;
        function init() {
            viewer = new OpenSeadragon.Viewer("container");
            viewer.openDzi("/iipsrv/iipsrv.fcgi?DeepZoom=/images/cmu1.jp2.dzi");
        }
        OpenSeadragon.addEvent(window, "load", init);
    </script>

When I click fullpage, in chrome, I get:

Uncaught TypeError: Cannot call method 'insertBefore' of undefined setFullPageopenseadragon.js:3969 onFullPageopenseadragon.js:4640 (anonymous function)openseadragon.js:587 (anonymous function)openseadragon.js:1933 $.EventHandler.raiseEventopenseadragon.js:1953 releaseHandleropenseadragon.js:6364 onMouseUpopenseadragon.js:2682 THIS.hash.mouseup

and in firefox:

[16:55:34.226] THIS[this.hash].prevElementParent is undefined @ http://localhost/demo3/openseadragon.js:3969

dustmoo commented 11 years ago

You might want to try instantiating your viewer the new way:

viewer = new OpenSeadragon({
    id:              "container",
    tileSources:     "/iipsrv/iipsrv.fcgi?DeepZoom=/images/cmu1.jp2.dzi"
});

OpenSeadragon(options) returns a viewer object. I was using Seadragon.option to set other options, and had to convert to this method. I don't have a dzi to test, but see if you still have the issue.

thatcher commented 11 years ago

please see https://github.com/openseadragon/openseadragon/issues/16