Add comment for StickyContainer extension

This commit is contained in:
Luke Barnard 2017-08-31 16:29:31 +01:00
parent 69bce6aee5
commit cdb28f956e

View file

@ -117,7 +117,11 @@ export default class ScrollPanel extends StickyContainer {
debuglog("Scroll event: offset now:", sn.scrollTop,
"_lastSetScroll:", this._lastSetScroll);
// Set the node and notify subscribers of the StickContainer
// By extending StickyContainer, we can set the scroll node to be that of the
// ScrolPanel to allow any `<Sticky>` children to be sticky, namely DateSeparators.
this.node = sn;
// Update subscribers - arbitrarily nested `<Sticky>` children
this.notifySubscribers(ev);
// Sometimes we see attempts to write to scrollTop essentially being