Skip to content

Commit

Permalink
Beta Fix - snap to grid should not be applying to projector mode when…
Browse files Browse the repository at this point in the history
… zoom lock is enabled.
  • Loading branch information
Azmoria committed Oct 25, 2024
1 parent 35f746f commit 4e3e2dd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CoreFunctions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
});
}
}
Expand Down
6 changes: 5 additions & 1 deletion Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)});
}
}

Expand Down

0 comments on commit 4e3e2dd

Please sign in to comment.