Work around precision/layout issues on some configurations.
Change-Id: I20ac73e254dbf2b8c163940a814b9a6bf4daa430
diff --git a/client/js/directives.js b/client/js/directives.js
index 4a73c2f..e2ce122 100644
--- a/client/js/directives.js
+++ b/client/js/directives.js
@@ -99,8 +99,11 @@
var leftElemWidthRatio = barLeftRatio;
var rightElemWidthRatio = 1.0 - barWidthRatio - barLeftRatio;
- leftElem.width(percentStr(leftElemWidthRatio - pads(leftElem)/containerElem.width()));
- rightElem.width(percentStr(rightElemWidthRatio - pads(rightElem)/containerElem.width()));
+ // on some configurations (precision issues?) we need to give some leeway for the implementation
+ var errorTolerance = 0.01;
+
+ leftElem.width(percentStr(leftElemWidthRatio - pads(leftElem)/containerElem.width() - errorTolerance));
+ rightElem.width(percentStr(rightElemWidthRatio - pads(rightElem)/containerElem.width() - errorTolerance));
currentBarLeftRatio = barLeftRatio;
}