We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7ee60d8 commit 7ad1308Copy full SHA for 7ad1308
1 file changed
src/helpers/saturation.js
@@ -1,7 +1,6 @@
1
export function calculateChange(e, skip, props, container) {
2
e.preventDefault()
3
- const containerWidth = container.clientWidth
4
- const containerHeight = container.clientHeight
+ const { width: containerWidth, height: containerHeight } = container.getBoundingClientRect()
5
const x = typeof e.pageX === 'number' ? e.pageX : e.touches[0].pageX
6
const y = typeof e.pageY === 'number' ? e.pageY : e.touches[0].pageY
7
let left = x - (container.getBoundingClientRect().left + window.pageXOffset)
0 commit comments