Skip to content

Commit

Permalink
Update inst/resources/gitbook/js/plugin-fontsettings.js
Browse files Browse the repository at this point in the history
Co-authored-by: Yihui Xie <[email protected]>
  • Loading branch information
hayden-MB and yihui authored Oct 25, 2024
1 parent 6d388a8 commit f5f2e6f
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions inst/resources/gitbook/js/plugin-fontsettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,10 @@ gitbook.require(["gitbook", "lodash", "jQuery"], function(gitbook, _, $) {
saveFontSettings();
};

// Increase line spacing
function increaseSpacing(e) {
// Increase or decrease line spacing
function changeSpacing(e, inc = true) {
e.preventDefault();
fontState.spacing++;
saveFontSettings();
}

// Decrease line spacing
function decreaseSpacing(e) {
e.preventDefault();
fontState.spacing > 10 && fontState.spacing--;
inc ? fontState.spacing++ : (fontState.spacing > 10 && fontState.spacing--);
saveFontSettings();
}

Expand Down

0 comments on commit f5f2e6f

Please sign in to comment.