We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4020c3a commit 19c984dCopy full SHA for 19c984d
services/static-webserver/client/source/class/osparc/wrapper/Svg.js
@@ -333,18 +333,16 @@ qx.Class.define("osparc.wrapper.Svg", {
333
const ellipsis = '…';
334
let low = 0;
335
let high = text.length;
336
-
337
// Binary search for the max fitting length
338
while (low < high) {
339
- let mid = Math.floor((low + high) / 2);
+ const mid = Math.floor((low + high) / 2);
340
label.text(text.slice(0, mid) + ellipsis);
341
if (label.bbox().width <= maxWidth) {
342
low = mid + 1;
343
} else {
344
high = mid;
345
}
346
347
348
return text.slice(0, low - 1) + ellipsis;
349
350
0 commit comments