Merge pull request #156 from FelixZY/fzy/scroll-x/1

feat: support horizontal scrolling
This commit is contained in:
1ilit
2024-07-18 22:13:26 +04:00
committed by GitHub

View File

@@ -468,7 +468,7 @@ export default function Canvas() {
setTransform((prev) => ({ setTransform((prev) => ({
...prev, ...prev,
pan: { pan: {
...prev.pan, x: prev.pan.x + e.deltaX / prev.zoom,
y: prev.pan.y + e.deltaY / prev.zoom, y: prev.pan.y + e.deltaY / prev.zoom,
}, },
})); }));