From 07a9f12b136e21d72ef6d573793b250513e920e2 Mon Sep 17 00:00:00 2001
From: Piotr Gawron <piotr.gawron@uni.lu>
Date: Tue, 7 Mar 2017 10:38:52 +0100
Subject: [PATCH] improvement of layout visualization

---
 web/src/main/webapp/resources/js/AliasInfoWindow.js | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/web/src/main/webapp/resources/js/AliasInfoWindow.js b/web/src/main/webapp/resources/js/AliasInfoWindow.js
index b3618574ea..2e77700521 100644
--- a/web/src/main/webapp/resources/js/AliasInfoWindow.js
+++ b/web/src/main/webapp/resources/js/AliasInfoWindow.js
@@ -62,6 +62,7 @@ AliasInfoWindow.prototype.createChartDiv = function() {
     } else {
       rowDiv.className = "mapChartRowOddDiv";
     }
+		rowDiv.style.position = "relative";
     var data = this.layoutAliases[i];
 
     var nameDiv = document.createElement("div");
@@ -94,8 +95,15 @@ AliasInfoWindow.prototype.createChartDiv = function() {
       rightBarDiv.style.background = color;
       rightBarDiv.style.width = Math.abs(value * 100) + "px";
 
+      var descDiv = document.createElement("div");
+      descDiv.style.float = "right";
+      descDiv.style.textAlign = "right";
+      descDiv.style.position = "absolute";
+      descDiv.style.right = "0";
+      descDiv.innerHTML = "<span>"+description+"</span>";
+
+
       if (!isNaN(value)) {
-        rightBarDiv.innerHTML = description;
         if (value > 0) {
           var offset = 100;
           leftMarginDiv.style.width = offset + "px";
@@ -118,13 +126,14 @@ AliasInfoWindow.prototype.createChartDiv = function() {
         var offset = 100;
         leftMarginDiv.style.width = offset + "px";
         leftMarginDiv.style.background = color;
-        leftMarginDiv.innerHTML = description;
         rightBarDiv.style.width = offset + "px";
         rightBarDiv.style.background = color;
+        rightBarDiv.style.textAlign = "right";
         rowDiv.appendChild(leftMarginDiv);
         rowDiv.appendChild(centerBarDiv);
         rowDiv.appendChild(rightBarDiv);
       }
+    	rowDiv.appendChild(descDiv);
     } else {
       var emptyDiv = document.createElement("div");
       emptyDiv.innerHTML = "&nbsp;";
-- 
GitLab