From f353c017037957279780ad20e7493b527d8a81db Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Tue, 20 Aug 2013 13:39:55 +0200 Subject: [PATCH] Improved task size calculation. --- app/assets/javascripts/app/controllers/task_widget.js.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/app/controllers/task_widget.js.coffee b/app/assets/javascripts/app/controllers/task_widget.js.coffee index 8b1e6c25d..85ef1845b 100644 --- a/app/assets/javascripts/app/controllers/task_widget.js.coffee +++ b/app/assets/javascripts/app/controllers/task_widget.js.coffee @@ -215,11 +215,11 @@ class Taskbar extends App.Controller elementsOversizeLeftTotal = 0 $('#task .task').each( (position, element) -> - widthTask = $(element).parent().width() + widthTask = $(element).width() if widthTask > task_size elementsOversize++ else - elementsOversizeLeftTotal += ( width / task_count ) - widthTask + elementsOversizeLeftTotal += task_size - widthTask ) addOversize = elementsOversizeLeftTotal / elementsOversize