diff --git a/CoreFunctions.js b/CoreFunctions.js index f3c373689..77fe299ba 100644 --- a/CoreFunctions.js +++ b/CoreFunctions.js @@ -970,7 +970,7 @@ function projector_scroll_event(event){ scrollPercentageX: (window.pageXOffset + window.innerWidth/2 - sidebarSize/2) / Math.max( document.body.scrollWidth, document.body.offsetWidth, document.documentElement.clientWidth, document.documentElement.scrollWidth, document.documentElement.offsetWidth ), zoom: zoom, - mapPos: convert_point_from_view_to_map(center.x, center.y) + mapPos: convert_point_from_view_to_map(center.x, center.y, true) }); } } diff --git a/Main.js b/Main.js index 4c0047201..2e19499ff 100644 --- a/Main.js +++ b/Main.js @@ -2667,7 +2667,11 @@ function init_ui() { // Function separated so it can be dis/enabled function mousemove(m) { if (curDown) { - window.scrollBy(curXPos - m.pageX, curYPos - m.pageY) + let scrollOptions = { + left: window.scrollX + curXPos - m.pageX, + top: window.scrollY + curYPos - m.pageY + } + requestAnimationFrame(function(){window.scrollTo(scrollOptions)}); } }