Add scrollwheel support for switching between blocks
tweaked on_scroll function