Merge pull request #3508 from cyberalien/ticket/13726

[ticket/13726] Fix function that calculates responsive breadcrumbs width
This commit is contained in:
Marc Alexander 2015-04-02 21:22:12 +02:00
commit 418aabb46e

View file

@ -376,12 +376,19 @@ function parseDocument($container) {
function resize() {
var width = 0,
diff = $left.outerWidth(true) - $left.width();
diff = $left.outerWidth(true) - $left.width(),
minWidth = Math.max($this.width() / 3, 240),
maxWidth;
$right.each(function() {
width += $(this).outerWidth(true);
var $this = $(this);
if ($this.is(':visible')) {
width += $this.outerWidth(true);
}
});
$left.css('max-width', Math.floor($this.width() - width - diff) + 'px');
maxWidth = $this.width() - width - diff;
$left.css('max-width', Math.floor(Math.max(maxWidth, minWidth)) + 'px');
}
resize();