Disable mouse scrolling in xaringan presentation

321 views Asked by At

I am making slides using xaringan in RStudio and on my Mac, the magic mouse scroll is too sensitive and basically makes using my mouse as a pointer very difficult. Is there a way to disable mouse scrolling?

A remark.js issue here suggests that it might be possible. I tried using the issue linked above to include the css chunk

{css}
var slideshow = remark.create({
  navigation: {
    scroll: false
  }
});

but not being too familiar with javascript and css I'm not sure exactly what else to try. Does anyone know how to achieve this within xaringan?

1

There are 1 answers

0
Martin C. Arnold On BEST ANSWER

There's no need to fiddle around with JavaScript here. All you need to do is to set scroll: false in the YAML header under output: like this:

output:
  xaringan::moon_reader:
    lib_dir: libs
    nature:
      navigation:
        scroll: false