From: Stas Vilchik Date: Tue, 16 Dec 2014 16:47:19 +0000 (+0100) Subject: Fix problem with zero-sized component viewer X-Git-Tag: 5.0-RC4~34 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=cefd5cfee7485e404b5658b0d91b67cf61bb44d0;p=sonarqube.git Fix problem with zero-sized component viewer --- diff --git a/server/sonar-web/src/main/coffee/component-viewer/main.coffee b/server/sonar-web/src/main/coffee/component-viewer/main.coffee index a35083017ff..ab9241fcbed 100644 --- a/server/sonar-web/src/main/coffee/component-viewer/main.coffee +++ b/server/sonar-web/src/main/coffee/component-viewer/main.coffee @@ -133,6 +133,8 @@ define [ width = @elementToFit.width() height = @elementToFit.height() + return if width == 0 || height == 0 + availableWidth = width - workspace.outerWidth(true) - 20 availableHeight = height - @$(@headerRegion.$el).outerHeight(true)