MOBILE-3814 collapsible: Change frozen status calculation
parent
d52fc9b666
commit
ddd82378aa
|
@ -363,8 +363,7 @@ export class CoreCollapsibleHeaderDirective implements OnInit, OnChanges, OnDest
|
|||
}
|
||||
|
||||
const scrollableHeight = contentScroll.scrollHeight - contentScroll.clientHeight;
|
||||
const collapsedHeight = expandedHeaderHeight - (expandedHeader.clientHeight ?? 0);
|
||||
const frozen = scrollableHeight + collapsedHeight <= 2 * expandedHeaderHeight;
|
||||
const frozen = scrollableHeight <= scrollingHeight;
|
||||
const progress = frozen
|
||||
? 0
|
||||
: CoreMath.clamp(contentScroll.scrollTop / scrollingHeight, 0, 1);
|
||||
|
@ -377,7 +376,7 @@ export class CoreCollapsibleHeaderDirective implements OnInit, OnChanges, OnDest
|
|||
.entries(progress > .5 ? collapsedFontStyles : expandedFontStyles)
|
||||
.forEach(([property, value]) => floatingTitle.style.setProperty(property, value as string));
|
||||
|
||||
if (progress > 0 || progress < 1) {
|
||||
if (progress > 0 && progress < 1) {
|
||||
// Finish opening or closing the bar.
|
||||
this.endAnimationTimeout = window.setTimeout(() => this.endAnimation(progress), 500);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue