瀏覽代碼

fix: grid jittery after partition PR (#6935)

zsviczian 2 年之前
父節點
當前提交
188921c247
共有 1 個文件被更改,包括 2 次插入4 次删除
  1. 2 4
      src/renderer/renderScene.ts

+ 2 - 4
src/renderer/renderScene.ts

@@ -934,10 +934,8 @@ const _renderStaticScene = ({
     strokeGrid(
       context,
       appState.gridSize,
-      -Math.ceil(appState.zoom.value / appState.gridSize) * appState.gridSize +
-        (appState.scrollX % appState.gridSize),
-      -Math.ceil(appState.zoom.value / appState.gridSize) * appState.gridSize +
-        (appState.scrollY % appState.gridSize),
+      appState.scrollX,
+      appState.scrollY,
       appState.zoom,
       normalizedWidth / appState.zoom.value,
       normalizedHeight / appState.zoom.value,