mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-23 21:56:10 +03:00
Allow user to add element option for navigator
This commit is contained in:
parent
36dd37b931
commit
4301254fa0
@ -55,7 +55,8 @@ $.Navigator = function( options ){
|
|||||||
navigatorSize;
|
navigatorSize;
|
||||||
|
|
||||||
//We may need to create a new element and id if they did not
|
//We may need to create a new element and id if they did not
|
||||||
//provide the id for the existing element
|
//provide the id for the existing element or the element itself
|
||||||
|
if( !options.element ){
|
||||||
if( !options.id ){
|
if( !options.id ){
|
||||||
options.id = 'navigator-' + $.now();
|
options.id = 'navigator-' + $.now();
|
||||||
this.element = $.makeNeutralElement( "div" );
|
this.element = $.makeNeutralElement( "div" );
|
||||||
@ -92,6 +93,14 @@ $.Navigator = function( options ){
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
this.element.id = options.id;
|
this.element.id = options.id;
|
||||||
|
} else {
|
||||||
|
this.element = options.element;
|
||||||
|
options.controlOptions = {
|
||||||
|
anchor: $.ControlAnchor.NONE,
|
||||||
|
attachToViewer: false,
|
||||||
|
autoFade: false
|
||||||
|
};
|
||||||
|
}
|
||||||
this.element.className += ' navigator';
|
this.element.className += ' navigator';
|
||||||
|
|
||||||
options = $.extend( true, {
|
options = $.extend( true, {
|
||||||
|
Loading…
Reference in New Issue
Block a user