Skip to content

Commit

Permalink
Merge pull request #2235 from framer/test/remove-rounding
Browse files Browse the repository at this point in the history
Support subpixel layouts in layout animations
  • Loading branch information
mergetron[bot] committed Jul 17, 2023
2 parents 10bfeac + 3b01cb2 commit 632130d
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 15 deletions.
6 changes: 3 additions & 3 deletions dev/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "framer-motion--dev",
"version": "10.12.21",
"version": "10.12.22-alpha.2",
"private": true,
"scripts": {
"dev": "webpack serve --config ./webpack/config.js --hot"
},
"dependencies": {
"@react-three/drei": "^7.27.3",
"@react-three/fiber": "^8.2.2",
"framer-motion": "^10.12.21",
"framer-motion-3d": "^10.12.21",
"framer-motion": "^10.12.22-alpha.2",
"framer-motion-3d": "^10.12.22-alpha.2",
"path-browserify": "^1.0.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "10.12.21",
"version": "10.12.22-alpha.2",
"packages": [
"packages/*"
],
Expand Down
6 changes: 3 additions & 3 deletions packages/framer-motion-3d/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "framer-motion-3d",
"version": "10.12.21",
"version": "10.12.22-alpha.2",
"description": "A simple and powerful React animation library for @react-three/fiber",
"main": "dist/cjs/index.js",
"module": "dist/es/index.mjs",
Expand Down Expand Up @@ -46,7 +46,7 @@
"postpublish": "git push --tags"
},
"dependencies": {
"framer-motion": "^10.12.21",
"framer-motion": "^10.12.22-alpha.2",
"react-merge-refs": "^2.0.1"
},
"peerDependencies": {
Expand All @@ -60,5 +60,5 @@
"@react-three/test-renderer": "^9.0.0",
"@rollup/plugin-commonjs": "^22.0.1"
},
"gitHead": "19af5092ea56b5a815446aa5855680300eeec80d"
"gitHead": "1694c651a6519f1d4d6cb879c74bee44546522bc"
}
2 changes: 1 addition & 1 deletion packages/framer-motion/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "framer-motion",
"version": "10.12.21",
"version": "10.12.22-alpha.2",
"description": "A simple and powerful React and JavaScript animation library",
"main": "dist/cjs/index.js",
"module": "dist/es/index.mjs",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2091,8 +2091,9 @@ const defaultLayoutTransition = {
}

function roundAxis(axis: Axis): void {
axis.min = Math.round(axis.min)
axis.max = Math.round(axis.max)
// Round to the nearest .5 pixels to support subpixel layouts
axis.min = Math.round(axis.min * 2) / 2
axis.max = Math.round(axis.max * 2) / 2
}

function roundBox(box: Box): void {
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7844,8 +7844,8 @@ __metadata:
cache-loader: ^1.2.5
convert-tsconfig-paths-to-webpack-aliases: ^0.9.2
fork-ts-checker-webpack-plugin: ^6.2.0
framer-motion: ^10.12.21
framer-motion-3d: ^10.12.21
framer-motion: ^10.12.22-alpha.2
framer-motion-3d: ^10.12.22-alpha.2
path-browserify: ^1.0.1
react: ^18.2.0
react-dom: ^18.2.0
Expand Down Expand Up @@ -7911,14 +7911,14 @@ __metadata:
languageName: unknown
linkType: soft

"framer-motion-3d@^10.12.21, framer-motion-3d@workspace:packages/framer-motion-3d":
"framer-motion-3d@^10.12.22-alpha.2, framer-motion-3d@workspace:packages/framer-motion-3d":
version: 0.0.0-use.local
resolution: "framer-motion-3d@workspace:packages/framer-motion-3d"
dependencies:
"@react-three/fiber": ^8.2.2
"@react-three/test-renderer": ^9.0.0
"@rollup/plugin-commonjs": ^22.0.1
framer-motion: ^10.12.21
framer-motion: ^10.12.22-alpha.2
react-merge-refs: ^2.0.1
peerDependencies:
"@react-three/fiber": ^8.2.2
Expand All @@ -7928,7 +7928,7 @@ __metadata:
languageName: unknown
linkType: soft

"framer-motion@^10.12.21, framer-motion@workspace:packages/framer-motion":
"framer-motion@^10.12.22-alpha.2, framer-motion@workspace:packages/framer-motion":
version: 0.0.0-use.local
resolution: "framer-motion@workspace:packages/framer-motion"
dependencies:
Expand Down

0 comments on commit 632130d

Please sign in to comment.