mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Remove logic of the topic truncation and fix the docs
This commit is contained in:
parent
3a27a756cc
commit
6a13d2d544
@ -134,11 +134,14 @@ RED.utils = (function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Truncates a string to a specified maximum length, adding ellipsis if truncated.
|
* Truncates a string to a specified maximum length, adding ellipsis
|
||||||
|
* if truncated.
|
||||||
*
|
*
|
||||||
* @param {string} str - The string to be truncated.
|
* @param {string} str The string to be truncated.
|
||||||
* @param {number} maxLength - The maximum length of the truncated string. Default `120`.
|
* @param {number} [maxLength = 120] The maximum length of the truncated
|
||||||
* @returns {string} The truncated string with ellipsis if it exceeds the maximum length.
|
* string. Default `120`.
|
||||||
|
* @returns {string} The truncated string with ellipsis if it exceeds the
|
||||||
|
* maximum length.
|
||||||
*/
|
*/
|
||||||
function truncateString(str, maxLength = 120) {
|
function truncateString(str, maxLength = 120) {
|
||||||
return str.length > maxLength ? str.slice(0, maxLength) + "..." : str;
|
return str.length > maxLength ? str.slice(0, maxLength) + "..." : str;
|
||||||
|
@ -131,10 +131,6 @@
|
|||||||
}
|
}
|
||||||
.red-ui-debug-msg-topic {
|
.red-ui-debug-msg-topic {
|
||||||
display: block;
|
display: block;
|
||||||
max-width: 100%;
|
|
||||||
overflow: hidden;
|
|
||||||
white-space: nowrap;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
color: var(--red-ui-debug-message-text-color-meta);
|
color: var(--red-ui-debug-message-text-color-meta);
|
||||||
}
|
}
|
||||||
.red-ui-debug-msg-name {
|
.red-ui-debug-msg-name {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user