AnsweredAssumed Answered

How do I disable trackpad scrolling in customized StoryMap?

Question asked by Wildlife_Friendly on Jan 30, 2018
Latest reply on Feb 20, 2018 by SSylvia-esristaff

Good afternoon! I'm trying to disable trackpad scrolling in my custom hosted StoryMap. We have embedded it in our website but it's very distracting to users that panning and zoom are enabled. We'd like to pan and zoom using the zoom buttons and click/dragging only. 

 

I've tried recommendations from a couple of years ago but they seem to no longer work. So far I've tried the following in my custom scripts. I'm not sure if I'm just doing it wrong or if there's no way to disable this functionality.

 

Thank you!!!

 

Marissa

 

define(["dojo/topic"], function(topic) {
     /*
     * Custom Javascript to be executed while the application is initializing goes here
     */
  app.map.smartNavigation: false


     // The application is ready
     topic.subscribe("tpl-ready", function(){
          /*
          * Custom Javascript to be executed when the application is ready goes here
          */

          map.on("load", function() {
         map.disableScrollWheel();
       });

          view.on("mouse-wheel", function(evt){
            evt.stopPropagation();
          });

          view.surface.addEventListener("wheel", function(event) {
  event.stopImmediatePropagation();
}, true);

     });
});

Outcomes