mirror of
https://github.com/openseadragon/openseadragon.git
synced 2025-01-19 17:21:50 +03:00
Merge remote-tracking branch 'cameronbaney/add-element-option-navigator' into patch-for-PR-1303
This commit is contained in:
commit
21146b6b2c
@ -55,7 +55,8 @@ $.Navigator = function( options ){
|
||||
navigatorSize;
|
||||
|
||||
//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 ){
|
||||
options.id = 'navigator-' + $.now();
|
||||
this.element = $.makeNeutralElement( "div" );
|
||||
@ -81,7 +82,6 @@ $.Navigator = function( options ){
|
||||
options.controlOptions.height = options.height;
|
||||
options.controlOptions.width = options.width;
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
this.element = document.getElementById( options.id );
|
||||
@ -92,6 +92,14 @@ $.Navigator = function( options ){
|
||||
};
|
||||
}
|
||||
this.element.id = options.id;
|
||||
} else {
|
||||
this.element = options.element;
|
||||
options.controlOptions = {
|
||||
anchor: $.ControlAnchor.NONE,
|
||||
attachToViewer: false,
|
||||
autoFade: false
|
||||
};
|
||||
}
|
||||
this.element.className += ' navigator';
|
||||
|
||||
options = $.extend( true, {
|
||||
|
Loading…
x
Reference in New Issue
Block a user