mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-24 22:26:10 +03:00
feature: navigatorPosition, option was available but not completely implemented
This commit is contained in:
parent
967f2e4f32
commit
88141c57f2
@ -58,15 +58,31 @@ $.Navigator = function( options ){
|
|||||||
if( !options.id ){
|
if( !options.id ){
|
||||||
options.id = 'navigator-' + $.now();
|
options.id = 'navigator-' + $.now();
|
||||||
this.element = $.makeNeutralElement( "div" );
|
this.element = $.makeNeutralElement( "div" );
|
||||||
options.controlOptions = {anchor: $.ControlAnchor.TOP_RIGHT,
|
options.controlOptions = {
|
||||||
attachToViewer: true,
|
anchor: $.ControlAnchor.TOP_RIGHT,
|
||||||
autoFade: true};
|
attachToViewer: true,
|
||||||
}
|
autoFade: true
|
||||||
else {
|
};
|
||||||
|
|
||||||
|
if( options.position ){
|
||||||
|
if( 'BOTTOM_RIGHT' == options.position ){
|
||||||
|
options.controlOptions.anchor = $.ControlAnchor.BOTTOM_RIGHT;
|
||||||
|
} else if( 'BOTTOM_LEFT' == options.position ){
|
||||||
|
options.controlOptions.anchor = $.ControlAnchor.BOTTOM_LEFT;
|
||||||
|
} else if( 'TOP_RIGHT' == options.position ){
|
||||||
|
options.controlOptions.anchor = $.ControlAnchor.TOP_RIGHT;
|
||||||
|
} else if( 'TOP_LEFT' == options.position ){
|
||||||
|
options.controlOptions.anchor = $.ControlAnchor.TOP_LEFT;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
this.element = document.getElementById( options.id );
|
this.element = document.getElementById( options.id );
|
||||||
options.controlOptions = {anchor: $.ControlAnchor.NONE,
|
options.controlOptions = {
|
||||||
attachToViewer: false,
|
anchor: $.ControlAnchor.NONE,
|
||||||
autoFade: false};
|
attachToViewer: false,
|
||||||
|
autoFade: false
|
||||||
|
};
|
||||||
}
|
}
|
||||||
this.element.id = options.id;
|
this.element.id = options.id;
|
||||||
this.element.className += ' navigator';
|
this.element.className += ' navigator';
|
||||||
|
Loading…
Reference in New Issue
Block a user