diff --git a/packages/react-devtools-shared/src/backend/fiber/renderer.js b/packages/react-devtools-shared/src/backend/fiber/renderer.js index b7fe41b96c5..176c723899e 100644 --- a/packages/react-devtools-shared/src/backend/fiber/renderer.js +++ b/packages/react-devtools-shared/src/backend/fiber/renderer.js @@ -2693,10 +2693,10 @@ export function attach( pushOperation(rects.length); for (let i = 0; i < rects.length; ++i) { const rect = rects[i]; - pushOperation(Math.round(rect.x)); - pushOperation(Math.round(rect.y)); - pushOperation(Math.round(rect.width)); - pushOperation(Math.round(rect.height)); + pushOperation(Math.round(rect.x * 1000)); + pushOperation(Math.round(rect.y * 1000)); + pushOperation(Math.round(rect.width * 1000)); + pushOperation(Math.round(rect.height * 1000)); } } } @@ -2765,10 +2765,10 @@ export function attach( pushOperation(rects.length); for (let i = 0; i < rects.length; ++i) { const rect = rects[i]; - pushOperation(Math.round(rect.x)); - pushOperation(Math.round(rect.y)); - pushOperation(Math.round(rect.width)); - pushOperation(Math.round(rect.height)); + pushOperation(Math.round(rect.x * 1000)); + pushOperation(Math.round(rect.y * 1000)); + pushOperation(Math.round(rect.width * 1000)); + pushOperation(Math.round(rect.height * 1000)); } } } diff --git a/packages/react-devtools-shared/src/devtools/store.js b/packages/react-devtools-shared/src/devtools/store.js index 86961f5bd91..f1aa61bfe9b 100644 --- a/packages/react-devtools-shared/src/devtools/store.js +++ b/packages/react-devtools-shared/src/devtools/store.js @@ -1587,10 +1587,10 @@ export default class Store extends EventEmitter<{ } else { rects = []; for (let rectIndex = 0; rectIndex < numRects; rectIndex++) { - const x = operations[i + 0]; - const y = operations[i + 1]; - const width = operations[i + 2]; - const height = operations[i + 3]; + const x = operations[i + 0] / 1000; + const y = operations[i + 1] / 1000; + const width = operations[i + 2] / 1000; + const height = operations[i + 3] / 1000; rects.push({x, y, width, height}); i += 4; } @@ -1763,10 +1763,10 @@ export default class Store extends EventEmitter<{ } else { nextRects = []; for (let rectIndex = 0; rectIndex < numRects; rectIndex++) { - const x = operations[i + 0]; - const y = operations[i + 1]; - const width = operations[i + 2]; - const height = operations[i + 3]; + const x = operations[i + 0] / 1000; + const y = operations[i + 1] / 1000; + const width = operations[i + 2] / 1000; + const height = operations[i + 3] / 1000; nextRects.push({x, y, width, height});