diff --git a/.changeset/happy-dodos-matter.md b/.changeset/happy-dodos-matter.md new file mode 100644 index 000000000..e8422ffaa --- /dev/null +++ b/.changeset/happy-dodos-matter.md @@ -0,0 +1,5 @@ +--- +"@codeimage/app": patch +--- + +fix: fix resize issue on Mac with different devicePixelRatio diff --git a/apps/codeimage/src/core/hooks/resizable.ts b/apps/codeimage/src/core/hooks/resizable.ts index 6a6d2c6d2..114d7395f 100644 --- a/apps/codeimage/src/core/hooks/resizable.ts +++ b/apps/codeimage/src/core/hooks/resizable.ts @@ -94,10 +94,9 @@ export function createHorizontalResize( const max = maxWidth(); const isLTR = state.startX > middle; - const computedWidth = - (isLTR - ? state.startWidth + x - state.startX - : state.startWidth - x + state.startX) * window.devicePixelRatio; + const computedWidth = isLTR + ? state.startWidth + x - state.startX + : state.startWidth - x + state.startX; setState({width: clamp(computedWidth, min, max)}); };