Skip to content

Commit

Permalink
Merge pull request #846 from jfbercher/toc2
Browse files Browse the repository at this point in the history
[toc2] - always read threshold parameter from system config - address #646
  • Loading branch information
jfbercher authored Jan 27, 2017
2 parents 4b519c3 + d91dad3 commit 56fa025
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/jupyter_contrib_nbextensions/nbextensions/toc2/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@ define(["require", "jquery", "base/js/namespace", 'services/config',
cfg.moveMenuLeft = IPython.notebook.metadata.toc.moveMenuLeft = config.data.toc2.moveMenuLeft;
}
}
// and also threshold taken globally as requested in #646 (if it exists, otherwise default)
cfg.threshold = IPython.notebook.metadata.toc.threshold = initial_cfg.threshold;
if (config.data.toc2) {
if (typeof config.data.toc2.threshold !== "undefined") {
cfg.threshold = IPython.notebook.metadata.toc.threshold = config.data.toc2.threshold;
}
}
// create highlights style section in document
create_additional_css()
// call callbacks
Expand Down

0 comments on commit 56fa025

Please sign in to comment.