From e9e762792aaa754e29c2ecbbd088b60f75b7d674 Mon Sep 17 00:00:00 2001
From: Michael Hamann <michael@content-space.de>
Date: Sun, 9 Sep 2012 00:39:37 +0200
Subject: [PATCH] Add more tolerance in js resize of the media manager FS#2369

This adds more tolerance to the width calculations of the media manager
panes which avoids that the right pane is displayed below the other
panes.
---
 lib/scripts/media.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/scripts/media.js b/lib/scripts/media.js
index a85b2ed0f..8f3c00c88 100644
--- a/lib/scripts/media.js
+++ b/lib/scripts/media.js
@@ -495,12 +495,12 @@ var dw_mediamanager = {
                 // set max width of resizable column
                 var widthOtherResizable = widthResizables - jQuery(this).width();
                 var minWidthNonResizable = parseFloat($filePanel.css("min-width"));
-                var maxWidth = widthFull - (widthOtherResizable + minWidthNonResizable);
+                var maxWidth = widthFull - (widthOtherResizable + minWidthNonResizable) - 1;
                 $resizables.resizable( "option", "maxWidth", maxWidth );
 
                 // width of file panel in % = 100% - width of resizables in %
-                // this calculates with 99.99 and not 100 to overcome rounding errors
-                var relWidthNonResizable = 99.99 - (100 * widthResizables / widthFull);
+                // this calculates with 99.9 and not 100 to overcome rounding errors
+                var relWidthNonResizable = 99.9 - (100 * widthResizables / widthFull);
                 // set width of file panel
                 $filePanel.width(relWidthNonResizable+'%');
 
-- 
GitLab