Fix the pointer-events error in the console (#635)

This commit is contained in:
DD Liu 2018-08-30 14:56:10 -04:00 committed by GitHub
parent 07effb7fd8
commit c6458ddebc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,15 +14,15 @@ const ScrollableCanvasComponent = props => (
{props.children} {props.children}
<div <div
className={styles.horizontalScrollbarWrapper} className={styles.horizontalScrollbarWrapper}
style={{'pointer-events': 'none'}} style={{pointerEvents: 'none'}}
> >
<div <div
className={styles.horizontalScrollbar} className={styles.horizontalScrollbar}
style={{ style={{
'width': `${props.horizontalScrollLengthPercent}%`, width: `${props.horizontalScrollLengthPercent}%`,
'left': `${props.horizontalScrollStartPercent}%`, left: `${props.horizontalScrollStartPercent}%`,
'pointer-events': 'all', pointerEvents: 'auto',
'display': `${props.hideCursor || display: `${props.hideCursor ||
Math.abs(props.horizontalScrollLengthPercent - 100) < 1e-8 ? 'none' : 'block'}` Math.abs(props.horizontalScrollLengthPercent - 100) < 1e-8 ? 'none' : 'block'}`
}} }}
onMouseDown={props.onHorizontalScrollbarMouseDown} onMouseDown={props.onHorizontalScrollbarMouseDown}
@ -30,15 +30,15 @@ const ScrollableCanvasComponent = props => (
</div> </div>
<div <div
className={styles.verticalScrollbarWrapper} className={styles.verticalScrollbarWrapper}
style={{'pointer-events': 'none'}} style={{pointerEvents: 'none'}}
> >
<div <div
className={styles.verticalScrollbar} className={styles.verticalScrollbar}
style={{ style={{
'height': `${props.verticalScrollLengthPercent}%`, height: `${props.verticalScrollLengthPercent}%`,
'top': `${props.verticalScrollStartPercent}%`, top: `${props.verticalScrollStartPercent}%`,
'pointer-events': 'auto', pointerEvents: 'auto',
'display': `${props.hideCursor || display: `${props.hideCursor ||
Math.abs(props.verticalScrollLengthPercent - 100) < 1e-8 ? 'none' : 'block'}` Math.abs(props.verticalScrollLengthPercent - 100) < 1e-8 ? 'none' : 'block'}`
}} }}
onMouseDown={props.onVerticalScrollbarMouseDown} onMouseDown={props.onVerticalScrollbarMouseDown}