Skip to content

Commit

Permalink
fix: firefox rounds index
Browse files Browse the repository at this point in the history
  • Loading branch information
msimmer committed Oct 17, 2022
1 parent 4089831 commit 4c83bd8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/b-ber-reader-react/src/lib/with-observers.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -258,10 +258,11 @@ const withObservers = WrappedComponent => {

const d = nodeEdgeRight / (frameWidth + paddingLeft)
const x = Math.round((d + Number.EPSILON) * 10) / 10
const nextX = Math.ceil(x)

console.log(nodeEdgeRight, d, x)
console.log(nodeEdgeRight, d, x, nextX)

lastSpreadIndex = x - 1
lastSpreadIndex = nextX - 1

console.log('lastSpreadIndex', lastSpreadIndex)
} else {
Expand Down

0 comments on commit 4c83bd8

Please sign in to comment.