Skip to content

Commit f300c96

Browse files
committed
fix: [show tracker] add btn to hide/show long rule
1 parent 63be1f3 commit f300c96

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

var/www/templates/hunter/tracker_show.html

+4-3
Original file line numberDiff line numberDiff line change
@@ -447,12 +447,13 @@ <h5>Filter Objects:</h5>
447447
const lineHeight = parseFloat(window.getComputedStyle(textElement).lineHeight);
448448
var maxLines = 30;
449449
const maxHeight = lineHeight * maxLines;
450-
451-
// Apply initial truncation
452-
textElement.style.maxHeight = maxHeight + 'px';
450+
453451
if (textElement.getBoundingClientRect().height < maxHeight) {
452+
textElement.style.maxHeight = '100%'
454453
btn_read_more.hide();
455454
} else {
455+
// Apply initial truncation
456+
textElement.style.maxHeight = maxHeight + 'px';
456457
btn_read_more.on("click", function() {
457458
if (btn_read_more.text() === "Show more") {
458459
textElement.style.maxHeight = 'none';

0 commit comments

Comments
 (0)