Changing Mouse Click Panning Functionality in Web App

1153
2
08-19-2016 06:53 AM
GeorgePorto
New Contributor II

I have a customer request to modify the panning mouse click functionality in a web app to mimic another application they use.  They want to make it so that clicking down on the center scroll wheel of the mouse and holding down allows for the panning in the map.  Any distant chance anyone as done this or knows what to modify in the application code to do this?

Tags (2)
0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus

George,

   WABs jimu/main.js specifically disables the wheel button (normally when you see a programmer do something like this there is a good reason).

// disable middle mouse button scroll
on(window, 'mousedown', function(evt) {
  if (!mouse.isMiddle(evt)) {
    return;
  }
  evt.preventDefault();
  evt.stopPropagation();
  evt.returnValue = false;
  return false;
});‍‍‍‍‍‍‍‍‍‍
GeorgePorto
New Contributor II

Thanks Robert

0 Kudos