From 76a16464a29b6aac43b2de79fc4a14e554c9f31f Mon Sep 17 00:00:00 2001 From: Ventero Date: Fri, 28 Sep 2012 20:02:22 +0200 Subject: [PATCH 1/2] Allow overriding the default navImages prefix url. --- openseadragon.js | 52 ++++++++++++++++++++++---------------------- src/openseadragon.js | 52 ++++++++++++++++++++++---------------------- 2 files changed, 52 insertions(+), 52 deletions(-) diff --git a/openseadragon.js b/openseadragon.js index b002a24f..3598b65e 100644 --- a/openseadragon.js +++ b/openseadragon.js @@ -222,7 +222,7 @@ * position. If preserveViewport is set to true, then the viewport position * is preserved when navigating between images in the sequence. * - * @param {String} [options.prefixUrl=''] + * @param {String} [options.prefixUrl='/images/'] * Appends the prefixUrl to navImages paths, which is very useful * since the default paths are rarely useful for production * environments. @@ -522,43 +522,43 @@ OpenSeadragon = window.OpenSeadragon || function( options ){ maxZoomPixelRatio: 2, //INTERFACE RESOURCE SETTINGS - prefixUrl: null, + prefixUrl: "/images/", navImages: { zoomIn: { - REST: '/images/zoomin_rest.png', - GROUP: '/images/zoomin_grouphover.png', - HOVER: '/images/zoomin_hover.png', - DOWN: '/images/zoomin_pressed.png' + REST: 'zoomin_rest.png', + GROUP: 'zoomin_grouphover.png', + HOVER: 'zoomin_hover.png', + DOWN: 'zoomin_pressed.png' }, zoomOut: { - REST: '/images/zoomout_rest.png', - GROUP: '/images/zoomout_grouphover.png', - HOVER: '/images/zoomout_hover.png', - DOWN: '/images/zoomout_pressed.png' + REST: 'zoomout_rest.png', + GROUP: 'zoomout_grouphover.png', + HOVER: 'zoomout_hover.png', + DOWN: 'zoomout_pressed.png' }, home: { - REST: '/images/home_rest.png', - GROUP: '/images/home_grouphover.png', - HOVER: '/images/home_hover.png', - DOWN: '/images/home_pressed.png' + REST: 'home_rest.png', + GROUP: 'home_grouphover.png', + HOVER: 'home_hover.png', + DOWN: 'home_pressed.png' }, fullpage: { - REST: '/images/fullpage_rest.png', - GROUP: '/images/fullpage_grouphover.png', - HOVER: '/images/fullpage_hover.png', - DOWN: '/images/fullpage_pressed.png' + REST: 'fullpage_rest.png', + GROUP: 'fullpage_grouphover.png', + HOVER: 'fullpage_hover.png', + DOWN: 'fullpage_pressed.png' }, previous: { - REST: '/images/previous_rest.png', - GROUP: '/images/previous_grouphover.png', - HOVER: '/images/previous_hover.png', - DOWN: '/images/previous_pressed.png' + REST: 'previous_rest.png', + GROUP: 'previous_grouphover.png', + HOVER: 'previous_hover.png', + DOWN: 'previous_pressed.png' }, next: { - REST: '/images/next_rest.png', - GROUP: '/images/next_grouphover.png', - HOVER: '/images/next_hover.png', - DOWN: '/images/next_pressed.png' + REST: 'next_rest.png', + GROUP: 'next_grouphover.png', + HOVER: 'next_hover.png', + DOWN: 'next_pressed.png' } } }, diff --git a/src/openseadragon.js b/src/openseadragon.js index b32412f0..05ea3c62 100644 --- a/src/openseadragon.js +++ b/src/openseadragon.js @@ -222,7 +222,7 @@ * position. If preserveViewport is set to true, then the viewport position * is preserved when navigating between images in the sequence. * - * @param {String} [options.prefixUrl=''] + * @param {String} [options.prefixUrl='/images/'] * Appends the prefixUrl to navImages paths, which is very useful * since the default paths are rarely useful for production * environments. @@ -522,43 +522,43 @@ OpenSeadragon = window.OpenSeadragon || function( options ){ maxZoomPixelRatio: 2, //INTERFACE RESOURCE SETTINGS - prefixUrl: null, + prefixUrl: "/images/", navImages: { zoomIn: { - REST: '/images/zoomin_rest.png', - GROUP: '/images/zoomin_grouphover.png', - HOVER: '/images/zoomin_hover.png', - DOWN: '/images/zoomin_pressed.png' + REST: 'zoomin_rest.png', + GROUP: 'zoomin_grouphover.png', + HOVER: 'zoomin_hover.png', + DOWN: 'zoomin_pressed.png' }, zoomOut: { - REST: '/images/zoomout_rest.png', - GROUP: '/images/zoomout_grouphover.png', - HOVER: '/images/zoomout_hover.png', - DOWN: '/images/zoomout_pressed.png' + REST: 'zoomout_rest.png', + GROUP: 'zoomout_grouphover.png', + HOVER: 'zoomout_hover.png', + DOWN: 'zoomout_pressed.png' }, home: { - REST: '/images/home_rest.png', - GROUP: '/images/home_grouphover.png', - HOVER: '/images/home_hover.png', - DOWN: '/images/home_pressed.png' + REST: 'home_rest.png', + GROUP: 'home_grouphover.png', + HOVER: 'home_hover.png', + DOWN: 'home_pressed.png' }, fullpage: { - REST: '/images/fullpage_rest.png', - GROUP: '/images/fullpage_grouphover.png', - HOVER: '/images/fullpage_hover.png', - DOWN: '/images/fullpage_pressed.png' + REST: 'fullpage_rest.png', + GROUP: 'fullpage_grouphover.png', + HOVER: 'fullpage_hover.png', + DOWN: 'fullpage_pressed.png' }, previous: { - REST: '/images/previous_rest.png', - GROUP: '/images/previous_grouphover.png', - HOVER: '/images/previous_hover.png', - DOWN: '/images/previous_pressed.png' + REST: 'previous_rest.png', + GROUP: 'previous_grouphover.png', + HOVER: 'previous_hover.png', + DOWN: 'previous_pressed.png' }, next: { - REST: '/images/next_rest.png', - GROUP: '/images/next_grouphover.png', - HOVER: '/images/next_hover.png', - DOWN: '/images/next_pressed.png' + REST: 'next_rest.png', + GROUP: 'next_grouphover.png', + HOVER: 'next_hover.png', + DOWN: 'next_pressed.png' } } }, From 0aba38c88cc3f09a133ddfd74e4e369c44291297 Mon Sep 17 00:00:00 2001 From: Ventero Date: Fri, 28 Sep 2012 20:03:45 +0200 Subject: [PATCH 2/2] Fix a typo in the documentation for options.prefixUrl. --- openseadragon.js | 2 +- src/openseadragon.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openseadragon.js b/openseadragon.js index 3598b65e..8048fe6e 100644 --- a/openseadragon.js +++ b/openseadragon.js @@ -223,7 +223,7 @@ * is preserved when navigating between images in the sequence. * * @param {String} [options.prefixUrl='/images/'] - * Appends the prefixUrl to navImages paths, which is very useful + * Prepends the prefixUrl to navImages paths, which is very useful * since the default paths are rarely useful for production * environments. * diff --git a/src/openseadragon.js b/src/openseadragon.js index 05ea3c62..cb72319a 100644 --- a/src/openseadragon.js +++ b/src/openseadragon.js @@ -223,7 +223,7 @@ * is preserved when navigating between images in the sequence. * * @param {String} [options.prefixUrl='/images/'] - * Appends the prefixUrl to navImages paths, which is very useful + * Prepends the prefixUrl to navImages paths, which is very useful * since the default paths are rarely useful for production * environments. *