Merge pull request #2318 from donotloveshampo/patch-1

Fixed #2314
This commit is contained in:
Ian Gilman 2023-03-31 15:27:43 -07:00 committed by GitHub
commit 3488d18e4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -399,11 +399,11 @@ $.extend( $.Navigator.prototype, $.EventSource.prototype, $.Viewer.prototype, /*
var style = this.displayRegion.style;
style.display = this.world.getItemCount() ? 'block' : 'none';
style.top = Math.round( topleft.y ) + 'px';
style.left = Math.round( topleft.x ) + 'px';
style.top = topleft.y.toFixed(2) + "px";
style.left = topleft.x.toFixed(2) + "px";
var width = Math.abs( topleft.x - bottomright.x );
var height = Math.abs( topleft.y - bottomright.y );
var width = bottomright.x - topleft.x;
var height = bottomright.y - topleft.y;
// make sure width and height are non-negative so IE doesn't throw
style.width = Math.round( Math.max( width, 0 ) ) + 'px';
style.height = Math.round( Math.max( height, 0 ) ) + 'px';