소스 검색

fix: draw offset issue

Peng Xiao 3 년 전
부모
커밋
b878b12750
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      tldraw/packages/utils/vec/src/index.ts

+ 1 - 1
tldraw/packages/utils/vec/src/index.ts

@@ -567,7 +567,7 @@ export class Vec {
 
 
   /** Get a vector comprised of the minimum of two or more vectors. */
   /** Get a vector comprised of the minimum of two or more vectors. */
   static min = (...v: number[][]) => {
   static min = (...v: number[][]) => {
-    return [Math.max(...v.map(a => a[0])), Math.max(...v.map(a => a[1]))]
+    return [Math.min(...v.map(a => a[0])), Math.min(...v.map(a => a[1]))]
   }
   }
 }
 }