This commit is contained in:
syuilo 2017-11-18 08:29:47 +09:00
parent cfad9ce6f2
commit 4458350ee5

View file

@ -241,11 +241,13 @@
}));
}
if (!this.opts.customize) {
this.containerTop = this.refs.main.getBoundingClientRect().top;
this.headerHight = this.root.getBoundingClientRect().top;
window.addEventListener('scroll', this.followWidgets);
window.addEventListener('resize', this.followWidgets);
}
});
this.on('unmount', () => {
@ -253,8 +255,10 @@
widget.unmount();
});
if (!this.opts.customize) {
window.removeEventListener('scroll', this.followWidgets);
window.removeEventListener('resize', this.followWidgets);
}
});
this.followWidgets = () => {