Added ControlAnchor options for default controls

This commit is contained in:
Mark Salsbery 2013-12-06 22:48:49 -08:00
parent dfcb9f381e
commit 6b6b7f7625
2 changed files with 16 additions and 8 deletions

View File

@ -264,6 +264,9 @@
* @property {Boolean} [showNavigationControl=true] * @property {Boolean} [showNavigationControl=true]
* Set to false to prevent the appearance of the default navigation controls. * Set to false to prevent the appearance of the default navigation controls.
* *
* @property {OpenSeadragon.ControlAnchor} [navigationControlAnchor=TOP_LEFT]
* Placement of the default navigation controls.
*
* @property {Boolean} [showNavigator=false] * @property {Boolean} [showNavigator=false]
* Set to true to make the navigator minimap appear. * Set to true to make the navigator minimap appear.
* *
@ -319,6 +322,9 @@
* If the viewer has been configured with a sequence of tile sources, then * If the viewer has been configured with a sequence of tile sources, then
* provide buttons for navigating forward and backward through the images. * provide buttons for navigating forward and backward through the images.
* *
* @property {OpenSeadragon.ControlAnchor} [sequenceControlAnchor=TOP_LEFT]
* Placement of the default sequence controls.
*
* @property {Number} [initialPage=0] * @property {Number} [initialPage=0]
* If the viewer has been configured with a sequence of tile sources, display this page initially. * If the viewer has been configured with a sequence of tile sources, display this page initially.
* *
@ -698,8 +704,10 @@ window.OpenSeadragon = window.OpenSeadragon || function( options ){
//DEFAULT CONTROL SETTINGS //DEFAULT CONTROL SETTINGS
showSequenceControl: true, //SEQUENCE showSequenceControl: true, //SEQUENCE
sequenceControlAnchor: null, //SEQUENCE
preserveViewport: false, //SEQUENCE preserveViewport: false, //SEQUENCE
showNavigationControl: true, //ZOOM/HOME/FULL/SEQUENCE showNavigationControl: true, //ZOOM/HOME/FULL/SEQUENCE
navigationControlAnchor: null, //ZOOM/HOME/FULL
controlsFadeDelay: 2000, //ZOOM/HOME/FULL/SEQUENCE controlsFadeDelay: 2000, //ZOOM/HOME/FULL/SEQUENCE
controlsFadeLength: 1500, //ZOOM/HOME/FULL/SEQUENCE controlsFadeLength: 1500, //ZOOM/HOME/FULL/SEQUENCE
mouseNavEnabled: true, //GENERAL MOUSE INTERACTIVITY mouseNavEnabled: true, //GENERAL MOUSE INTERACTIVITY

View File

@ -1122,7 +1122,7 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
}else{ }else{
this.addControl( this.addControl(
this.pagingControl, this.pagingControl,
{anchor: $.ControlAnchor.TOP_LEFT} {anchor: this.sequenceControlAnchor ? this.sequenceControlAnchor : $.ControlAnchor.TOP_LEFT}
); );
} }
} }
@ -1243,7 +1243,7 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
}else{ }else{
this.addControl( this.addControl(
this.navControl, this.navControl,
{anchor: $.ControlAnchor.TOP_LEFT} {anchor: this.navigationControlAnchor ? this.navigationControlAnchor : $.ControlAnchor.TOP_LEFT}
); );
} }
} }