mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 21:26:10 +03:00
Navigator update
Allow navigators hosted in a user-supplied element to be styled by user.
This commit is contained in:
parent
23954d0adf
commit
7ce552caf9
@ -118,6 +118,7 @@ $.Navigator = function( options ){
|
|||||||
this.totalBorderWidths = new $.Point(this.borderWidth*2, this.borderWidth*2).minus(this.fudge);
|
this.totalBorderWidths = new $.Point(this.borderWidth*2, this.borderWidth*2).minus(this.fudge);
|
||||||
|
|
||||||
|
|
||||||
|
if ( options.controlOptions.anchor != $.ControlAnchor.NONE ) {
|
||||||
(function( style, borderWidth ){
|
(function( style, borderWidth ){
|
||||||
style.margin = '0px';
|
style.margin = '0px';
|
||||||
style.border = borderWidth + 'px solid #555';
|
style.border = borderWidth + 'px solid #555';
|
||||||
@ -126,6 +127,7 @@ $.Navigator = function( options ){
|
|||||||
style.opacity = 0.8;
|
style.opacity = 0.8;
|
||||||
style.overflow = 'hidden';
|
style.overflow = 'hidden';
|
||||||
}( this.element.style, this.borderWidth));
|
}( this.element.style, this.borderWidth));
|
||||||
|
}
|
||||||
|
|
||||||
this.displayRegion = $.makeNeutralElement( "div" );
|
this.displayRegion = $.makeNeutralElement( "div" );
|
||||||
this.displayRegion.id = this.element.id + '-displayregion';
|
this.displayRegion.id = this.element.id + '-displayregion';
|
||||||
@ -180,7 +182,7 @@ $.Navigator = function( options ){
|
|||||||
options.controlOptions
|
options.controlOptions
|
||||||
);
|
);
|
||||||
|
|
||||||
if ( options.controlOptions.anchor != $.ControlAnchor.ABSOLUTE ) {
|
if ( options.controlOptions.anchor != $.ControlAnchor.ABSOLUTE && options.controlOptions.anchor != $.ControlAnchor.NONE ) {
|
||||||
if ( options.width && options.height ) {
|
if ( options.width && options.height ) {
|
||||||
this.element.style.height = typeof ( options.height ) == "number" ? ( options.height + 'px' ) : options.height;
|
this.element.style.height = typeof ( options.height ) == "number" ? ( options.height + 'px' ) : options.height;
|
||||||
this.element.style.width = typeof ( options.width ) == "number" ? ( options.width + 'px' ) : options.width;
|
this.element.style.width = typeof ( options.width ) == "number" ? ( options.width + 'px' ) : options.width;
|
||||||
|
Loading…
Reference in New Issue
Block a user