Skip to content

Commit 1fba9e9

Browse files
authored
release 0.0.14 (#39)
1 parent a7376d7 commit 1fba9e9

5 files changed

Lines changed: 26 additions & 20 deletions

File tree

dist/build.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68629,6 +68629,9 @@ azdataGraph.prototype.getStyledTooltipForCell = function (cell) {
6862968629
// tooltip body
6863068630
let startIndex = cell.edge ? 0 : 1; // first index for vertices contains footer label, so we can skip for vertices.
6863168631
for (var i = startIndex; i < cell.value.metrics.length; ++i) {
68632+
if(cell.value.metrics[i].isLongString){ // Skipping all strings as they go to the bottom of tooltip
68633+
continue;
68634+
}
6863268635
tooltip += `<div style=\"${tooltipLineHeight}\">`;
6863368636

6863468637
tooltip += `<div style=\"${justifyContent}\">`;
@@ -68645,12 +68648,11 @@ azdataGraph.prototype.getStyledTooltipForCell = function (cell) {
6864568648

6864668649
// tooltip footer for vertices only
6864768650
if (!cell.edge) {
68648-
tooltip += '<hr />';
68649-
tooltip += `<div style=\"${footerTopMargin}\"><span style=\"${boldText}\">${cell.value.metrics[0].name}</span></div>`;
68650-
tooltip += `<div><span>${cell.value.metrics[0].value}</span></div>`;
68651-
tooltip += `<div><span style=\"${boldText}\">Warnings</span></div>`;
68652-
tooltip += '<div><span>No join predicate</span></div>';
68653-
68651+
cell.value.metrics.filter(m => m.isLongString).forEach(m => {
68652+
tooltip += '<hr />';
68653+
tooltip += `<div style=\"${footerTopMargin}\"><span style=\"${boldText}\">${m.name}</span></div>`;
68654+
tooltip += `<div><span>${m.value.replace(/(\r\n|\n|\r)/gm, " ")}</span></div>`; // Removing all line breaks as they look bad in tooltips
68655+
})
6865468656
}
6865568657

6865668658
tooltip += '</div>';

dist/js/azdata/view/azDataGraph.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@ azdataGraph.prototype.getStyledTooltipForCell = function (cell) {
127127
// tooltip body
128128
let startIndex = cell.edge ? 0 : 1; // first index for vertices contains footer label, so we can skip for vertices.
129129
for (var i = startIndex; i < cell.value.metrics.length; ++i) {
130+
if(cell.value.metrics[i].isLongString){ // Skipping all strings as they go to the bottom of tooltip
131+
continue;
132+
}
130133
tooltip += `<div style=\"${tooltipLineHeight}\">`;
131134

132135
tooltip += `<div style=\"${justifyContent}\">`;
@@ -143,12 +146,11 @@ azdataGraph.prototype.getStyledTooltipForCell = function (cell) {
143146

144147
// tooltip footer for vertices only
145148
if (!cell.edge) {
146-
tooltip += '<hr />';
147-
tooltip += `<div style=\"${footerTopMargin}\"><span style=\"${boldText}\">${cell.value.metrics[0].name}</span></div>`;
148-
tooltip += `<div><span>${cell.value.metrics[0].value}</span></div>`;
149-
tooltip += `<div><span style=\"${boldText}\">Warnings</span></div>`;
150-
tooltip += '<div><span>No join predicate</span></div>';
151-
149+
cell.value.metrics.filter(m => m.isLongString).forEach(m => {
150+
tooltip += '<hr />';
151+
tooltip += `<div style=\"${footerTopMargin}\"><span style=\"${boldText}\">${m.name}</span></div>`;
152+
tooltip += `<div><span>${m.value.replace(/(\r\n|\n|\r)/gm, " ")}</span></div>`; // Removing all line breaks as they look bad in tooltips
153+
})
152154
}
153155

154156
tooltip += '</div>';

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "azdataGraph",
33
"description": "azdataGraph is a derivative of mxGraph, which is a fully client side JavaScript diagramming library that uses SVG and HTML for rendering.",
4-
"version": "0.0.13",
4+
"version": "0.0.14",
55
"homepage": "https://github.com/microsoft/azdataGraph",
66
"author": "Microsoft",
77
"license": "Apache-2.0",

src/js/azdata/view/azDataGraph.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@ azdataGraph.prototype.getStyledTooltipForCell = function (cell) {
127127
// tooltip body
128128
let startIndex = cell.edge ? 0 : 1; // first index for vertices contains footer label, so we can skip for vertices.
129129
for (var i = startIndex; i < cell.value.metrics.length; ++i) {
130+
if(cell.value.metrics[i].isLongString){ // Skipping all strings as they go to the bottom of tooltip
131+
continue;
132+
}
130133
tooltip += `<div style=\"${tooltipLineHeight}\">`;
131134

132135
tooltip += `<div style=\"${justifyContent}\">`;
@@ -143,12 +146,11 @@ azdataGraph.prototype.getStyledTooltipForCell = function (cell) {
143146

144147
// tooltip footer for vertices only
145148
if (!cell.edge) {
146-
tooltip += '<hr />';
147-
tooltip += `<div style=\"${footerTopMargin}\"><span style=\"${boldText}\">${cell.value.metrics[0].name}</span></div>`;
148-
tooltip += `<div><span>${cell.value.metrics[0].value}</span></div>`;
149-
tooltip += `<div><span style=\"${boldText}\">Warnings</span></div>`;
150-
tooltip += '<div><span>No join predicate</span></div>';
151-
149+
cell.value.metrics.filter(m => m.isLongString).forEach(m => {
150+
tooltip += '<hr />';
151+
tooltip += `<div style=\"${footerTopMargin}\"><span style=\"${boldText}\">${m.name}</span></div>`;
152+
tooltip += `<div><span>${m.value.replace(/(\r\n|\n|\r)/gm, " ")}</span></div>`; // Removing all line breaks as they look bad in tooltips
153+
})
152154
}
153155

154156
tooltip += '</div>';

test/queryplan/src/js/graph.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)