mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 21:26:10 +03:00
Fix margin bug with legacy fullscreen mode
This commit is contained in:
parent
f712e15793
commit
d4a4276bbc
@ -692,10 +692,15 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
|
|||||||
|
|
||||||
if ( fullPage ) {
|
if ( fullPage ) {
|
||||||
|
|
||||||
this.bodyOverflow = bodyStyle.overflow;
|
this.bodyMargin = bodyStyle.margin;
|
||||||
this.docOverflow = docStyle.overflow;
|
this.docMargin = docStyle.margin;
|
||||||
bodyStyle.overflow = "hidden";
|
bodyStyle.margin = "0";
|
||||||
docStyle.overflow = "hidden";
|
docStyle.margin = "0";
|
||||||
|
|
||||||
|
this.bodyPadding = bodyStyle.padding;
|
||||||
|
this.docPadding = docStyle.padding;
|
||||||
|
bodyStyle.padding = "0";
|
||||||
|
docStyle.padding = "0";
|
||||||
|
|
||||||
this.bodyWidth = bodyStyle.width;
|
this.bodyWidth = bodyStyle.width;
|
||||||
this.bodyHeight = bodyStyle.height;
|
this.bodyHeight = bodyStyle.height;
|
||||||
@ -761,7 +766,7 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
|
|||||||
);
|
);
|
||||||
this.element.style.height = '100%';
|
this.element.style.height = '100%';
|
||||||
this.element.style.width = '100%';
|
this.element.style.width = '100%';
|
||||||
}else{
|
} else {
|
||||||
this.element.style.height = $.getWindowSize().y + 'px';
|
this.element.style.height = $.getWindowSize().y + 'px';
|
||||||
this.element.style.width = $.getWindowSize().x + 'px';
|
this.element.style.width = $.getWindowSize().x + 'px';
|
||||||
}
|
}
|
||||||
@ -788,8 +793,11 @@ $.extend( $.Viewer.prototype, $.EventSource.prototype, $.ControlDock.prototype,
|
|||||||
$.cancelFullScreen( document );
|
$.cancelFullScreen( document );
|
||||||
}
|
}
|
||||||
|
|
||||||
bodyStyle.overflow = this.bodyOverflow;
|
bodyStyle.margin = this.bodyMargin;
|
||||||
docStyle.overflow = this.docOverflow;
|
docStyle.margin = this.docMargin;
|
||||||
|
|
||||||
|
bodyStyle.padding = this.bodyPadding;
|
||||||
|
docStyle.padding = this.docPadding;
|
||||||
|
|
||||||
bodyStyle.width = this.bodyWidth;
|
bodyStyle.width = this.bodyWidth;
|
||||||
bodyStyle.height = this.bodyHeight;
|
bodyStyle.height = this.bodyHeight;
|
||||||
|
Loading…
Reference in New Issue
Block a user