1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-20 05:39:42 +02:00

improved TOC/page jumps

This commit is contained in:
Harvey Kandola 2017-12-14 16:48:12 +00:00
parent 215f644d11
commit 6f1b0564e2
5 changed files with 105 additions and 90 deletions

View file

@ -32,12 +32,12 @@ export default Component.extend(NotifierMixin, TooltipMixin, {
this._super(...arguments);
this.loadBlocks();
schedule('afterRender', () => {
let jumpTo = "#page-" + this.get('pageId');
if (!$(jumpTo).inView()) {
$(jumpTo).velocity("scroll", { duration: 250, offset: -100 });
}
});
// schedule('afterRender', () => {
// let jumpTo = "#page-" + this.get('pageId');
// if (!$(jumpTo).inView()) {
// $(jumpTo).velocity("scroll", { duration: 250, offset: -100 });
// }
// });
},
didRender() {
@ -49,6 +49,9 @@ export default Component.extend(NotifierMixin, TooltipMixin, {
this._super(...arguments);
this.setupAddWizard();
console.log(this.get('pageId'));
this.attrs.onGotoPage(this.get('pageId'));
this.renderTooltips();
},