mirror of
https://github.com/documize/community.git
synced 2025-07-21 22:29:41 +02:00
Set Table of Contents breakpoint to 1600
For lower resolution displays.
This commit is contained in:
parent
d45182b382
commit
3e1ee64e6f
1 changed files with 6 additions and 6 deletions
|
@ -44,7 +44,7 @@ export default Component.extend(TooltipMixin, {
|
||||||
indentDisabled: true,
|
indentDisabled: true,
|
||||||
outdentDisabled: true,
|
outdentDisabled: true,
|
||||||
pageId: ''
|
pageId: ''
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
didReceiveAttrs() {
|
didReceiveAttrs() {
|
||||||
|
@ -57,7 +57,7 @@ export default Component.extend(TooltipMixin, {
|
||||||
this._super(...arguments);
|
this._super(...arguments);
|
||||||
this.eventBus.subscribe('documentPageAdded', this, 'onDocumentPageAdded');
|
this.eventBus.subscribe('documentPageAdded', this, 'onDocumentPageAdded');
|
||||||
this.eventBus.subscribe('resized', this, 'setSize');
|
this.eventBus.subscribe('resized', this, 'setSize');
|
||||||
|
|
||||||
this.setSize();
|
this.setSize();
|
||||||
this.renderTooltips();
|
this.renderTooltips();
|
||||||
},
|
},
|
||||||
|
@ -78,15 +78,15 @@ export default Component.extend(TooltipMixin, {
|
||||||
|
|
||||||
setSize() {
|
setSize() {
|
||||||
schedule('afterRender', () => {
|
schedule('afterRender', () => {
|
||||||
let isDesktop = $(window).width() >= 1800;
|
let isDesktop = $(window).width() >= 1600;
|
||||||
this.set('isDesktop', isDesktop);
|
this.set('isDesktop', isDesktop);
|
||||||
|
|
||||||
if (isDesktop) {
|
if (isDesktop) {
|
||||||
let h = $(window).height() - $("#nav-bar").height() - 140;
|
let h = $(window).height() - $("#nav-bar").height() - 140;
|
||||||
$("#doc-toc").css('max-height', h);
|
$("#doc-toc").css('max-height', h);
|
||||||
|
|
||||||
let i = $("#doc-view").offset();
|
let i = $("#doc-view").offset();
|
||||||
|
|
||||||
if (is.not.undefined(i)) {
|
if (is.not.undefined(i)) {
|
||||||
let l = i.left - 100;
|
let l = i.left - 100;
|
||||||
if (l > 350) l = 350;
|
if (l > 350) l = 350;
|
||||||
|
@ -251,7 +251,7 @@ export default Component.extend(TooltipMixin, {
|
||||||
// Outdent -- changes a page from H3 to H2, etc.
|
// Outdent -- changes a page from H3 to H2, etc.
|
||||||
pageOutdent() {
|
pageOutdent() {
|
||||||
if (!this.get('canEdit')) return;
|
if (!this.get('canEdit')) return;
|
||||||
|
|
||||||
let state = this.get('state');
|
let state = this.get('state');
|
||||||
let pages = this.get('pages');
|
let pages = this.get('pages');
|
||||||
let page = _.find(pages, function(i) { return i.get('page.id') === state.pageId; });
|
let page = _.find(pages, function(i) { return i.get('page.id') === state.pageId; });
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue