Skip to content

Commit a2e2f75

Browse files
committed
Add a pointer off option
1 parent f8f2e9a commit a2e2f75

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/jupyteredit.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
.jpt-edit-iframe {
22
box-sizing: content-box;
3+
}
4+
5+
.jpyt-edit-iframe-pointeroff {
6+
pointer-events: none;
37
}

src/jupyteredit.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,12 +247,14 @@ export class JupyterEdit extends Component {
247247
height = Math.ceil(appletSize.height * 1.01) + 'px'
248248
}
249249
}
250+
let className = 'jpt-edit-iframe'
251+
if (this.props.pointerOff) className += ' jpyt-edit-iframe-pointeroff'
250252

251253
return (
252254
<Fragment>
253255
<iframe
254256
style={{ width, height }}
255-
className='jpt-edit-iframe'
257+
className={className}
256258
src={jupyterurl || this.props.jupyterurl}
257259
ref={(el) => {
258260
this.iframe = el

0 commit comments

Comments
 (0)