release(content-suggestions): v0.1.2
This commit is contained in:
@@ -374,6 +374,9 @@ var AngularContentTextRenderer = class {
|
||||
}
|
||||
return cutoff;
|
||||
}
|
||||
hasVerticalOverflow(element) {
|
||||
return element.scrollHeight - element.clientHeight > 1;
|
||||
}
|
||||
render() {
|
||||
if (!this.host) {
|
||||
return;
|
||||
@@ -409,13 +412,13 @@ var AngularContentTextRenderer = class {
|
||||
paragraph.style.setProperty("-webkit-box-orient", "vertical");
|
||||
paragraph.style.setProperty("-webkit-line-clamp", String(ellipsisConfig.rows));
|
||||
paragraph.style.overflow = "hidden";
|
||||
if (ellipsisConfig.expandable) {
|
||||
wrapper.append(paragraph);
|
||||
wrapper.append(paragraph);
|
||||
this.host.replaceChildren(wrapper);
|
||||
if (ellipsisConfig.expandable && this.hasVerticalOverflow(paragraph)) {
|
||||
wrapper.append(this.buildReadMoreButton(ellipsisConfig.symbol));
|
||||
this.host.replaceChildren(wrapper);
|
||||
this.emitOnViewIfNeeded(mergedExpanded);
|
||||
return;
|
||||
}
|
||||
this.emitOnViewIfNeeded(mergedExpanded);
|
||||
return;
|
||||
}
|
||||
}
|
||||
wrapper.append(paragraph);
|
||||
|
||||
Reference in New Issue
Block a user