How to limit pan operation inside mapDiv?

Discussion created by imihiro on Oct 9, 2013
Map is panned even when mouse is out of the mapDiv.
   The out-of-box pan was designed pretty nice.
   However in my case, pan must be disabled when mouse is out of mapDiv. How to do that?