Getting explicit about pixels and size.
Eventually, well have to ask renderers for all pixel and size related stuff. And the map overlay renderer will do all pixel<->loc math. For now, we let the map do this math based on its viewport - as this is where the mouse events are handled and it is pixels relative to the viewport that are being generated. For now, the getViewportPixelForLoc and getLocForViewportPixel are now more explicitly named.
This commit is contained in:
@@ -55,7 +55,7 @@ ol.control.Navigation.prototype.deactivate = function() {
|
||||
* @param {Object} evt
|
||||
*/
|
||||
ol.control.Navigation.prototype.moveMap = function(evt) {
|
||||
this.map_.moveByPx(evt.deltaX, evt.deltaY);
|
||||
this.map_.moveByViewportPx(evt.deltaX, evt.deltaY);
|
||||
return false;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user