Skip to content
This repository was archived by the owner on May 14, 2025. It is now read-only.

Commit e1b2e96

Browse files
BoykoAlexghillert
authored andcommitted
Cleanup temp nodes. Switch to spring-flo from master.
1 parent ff6d1f2 commit e1b2e96

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"web-animations-js": "2.3.1",
4242
"stompjs": "2.3.3",
4343
"jshint": "2.9.5",
44-
"spring-flo": "git://github.com/spring-projects/spring-flo.git#angular5",
44+
"spring-flo": "git://github.com/spring-projects/spring-flo.git#c39d28dba288095fc56350ac11f46c89878f1215",
4545
"ng-busy": "1.4.4"
4646
},
4747
"devDependencies": {

ui/src/app/streams/flo/support/view-helper.ts

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -280,16 +280,20 @@ export class ViewHelper {
280280

281281
document.body.appendChild(svgDocument);
282282

283-
width = textSpan.getComputedTextLength();
284-
for (let i = 1; i < width && width > threshold; i++) {
285-
textNode.data = label.substr(0, label.length - i) + '\u2026';
283+
try {
286284
width = textSpan.getComputedTextLength();
287-
}
285+
for (let i = 1; i < width && width > threshold; i++) {
286+
textNode.data = label.substr(0, label.length - i) + '\u2026';
287+
width = textSpan.getComputedTextLength();
288+
}
288289

289-
if (offset) {
290-
(<any>node).attr('.label1/ref-x', Math.max((offset + HORIZONTAL_PADDING + width / 2) / IMAGE_W, 0.5), {silent: true});
290+
if (offset) {
291+
(<any>node).attr('.label1/ref-x', Math.max((offset + HORIZONTAL_PADDING + width / 2) / IMAGE_W, 0.5), {silent: true});
292+
}
293+
(<any>node).attr(labelPath, textNode.data);
294+
} finally {
295+
document.body.removeChild(svgDocument);
291296
}
292-
(<any>node).attr(labelPath, textNode.data);
293297
} else {
294298
(<any>node).attr('.label1/ref-x', Math.max((offset + HORIZONTAL_PADDING + width / 2) / IMAGE_W, 0.5));
295299
}

0 commit comments

Comments
 (0)