3
Vote

Make navImages path configurable separately (and default to './images')

description

Currently navImages is set like this:
this.navImages = {
    zoomIn: {
        REST: '/Scripts/images/zoomin_rest.png',
        GROUP: '/Scripts/images/zoomin_grouphover.png',
        HOVER: '/Scripts/images/zoomin_hover.png',
        DOWN: '/Scripts/images/zoomin_pressed.png'
    },
    zoomOut: {
        REST: '/Scripts/images/zoomout_rest.png',
        GROUP: '/Scripts/images/zoomout_grouphover.png',
        HOVER: '/Scripts/images/zoomout_hover.png',
        DOWN: '/Scripts/images/zoomout_pressed.png'
    },
    home: {
        REST: '/Scripts/images/home_rest.png',
        GROUP: '/Scripts/images/home_grouphover.png',
        HOVER: '/Scripts/images/home_hover.png',
        DOWN: '/Scripts/images/home_pressed.png'
    },
    fullpage: {
        REST: '/Scripts/images/fullpage_rest.png',
        GROUP: '/Scripts/images/fullpage_grouphover.png',
        HOVER: '/Scripts/images/fullpage_hover.png',
        DOWN: '/Scripts/images/fullpage_pressed.png'
    }
}
This requires you to either have access to your server's root directory to create 'Scripts' or to change each path separately.

Wouldn't it be nicer to have the path in a single variable? One that is preset to './images/' ?
this.navImagesPath = './images';
this.navImages = {
    zoomIn: {
        REST: navImagesPath + 'zoomin_rest.png',
        GROUP: navImagesPath + 'zoomin_grouphover.png',
        HOVER: navImagesPath + 'zoomin_hover.png',
        DOWN: navImagesPath + 'zoomin_pressed.png'
    },
...

This would allow the user to extract the OpenSeadragon anywhere in the web servers hierarchy. Just slap in a basic html file and your .dzi and your instant OpenSeadragon is done.

comments