Skip to content

Commit

Permalink
Add a pointer off option
Browse files Browse the repository at this point in the history
  • Loading branch information
martenrichter committed Jan 12, 2025
1 parent f8f2e9a commit a2e2f75
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/jupyteredit.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.jpt-edit-iframe {
box-sizing: content-box;
}

.jpyt-edit-iframe-pointeroff {
pointer-events: none;
}
4 changes: 3 additions & 1 deletion src/jupyteredit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -247,12 +247,14 @@ export class JupyterEdit extends Component {
height = Math.ceil(appletSize.height * 1.01) + 'px'
}
}
let className = 'jpt-edit-iframe'
if (this.props.pointerOff) className += ' jpyt-edit-iframe-pointeroff'

return (
<Fragment>
<iframe
style={{ width, height }}
className='jpt-edit-iframe'
className={className}
src={jupyterurl || this.props.jupyterurl}
ref={(el) => {
this.iframe = el
Expand Down

0 comments on commit a2e2f75

Please sign in to comment.