Skip to content

Commit 513456b

Browse files
committed
Added pointer events none
1 parent d26156a commit 513456b

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/ImageMask/index.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
// @flow
22

33
import React, { useState, useEffect, useMemo } from "react"
4-
// videoPlaying={videoPlaying}
5-
// imagePosition={imagePosition}
6-
// mouse-events -> none
7-
export default ({ imageData, imagePosition, videoPlaying, maskVersion, opacity = 0.5, zIndex = 999, position = 'absolute'}) => {
4+
export default ({ imageData, imagePosition, videoPlaying, maskVersion, pointerEvents = "none", opacity = 0.5, zIndex = 999, position = 'absolute'}) => {
85
const [canvasRef, setCanvasRef] = useState(null)
96

107
useEffect(() => {
@@ -23,7 +20,8 @@ export default ({ imageData, imagePosition, videoPlaying, maskVersion, opacity =
2320
height: isNaN(height) ? 0 : height,
2421
zIndex,
2522
position,
26-
opacity
23+
opacity,
24+
pointerEvents
2725
}
2826
}, [
2927
imagePosition.topLeft.x,
@@ -32,7 +30,8 @@ export default ({ imageData, imagePosition, videoPlaying, maskVersion, opacity =
3230
imagePosition.bottomRight.y,
3331
zIndex,
3432
position,
35-
opacity
33+
opacity,
34+
pointerEvents
3635
])
3736

3837
return (

0 commit comments

Comments
 (0)