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:
parent
215f644d11
commit
6f1b0564e2
5 changed files with 105 additions and 90 deletions
|
@ -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();
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue