Skip to content

Commit

Permalink
fix: temporally disable pointer tool and hide toolbar on presentation…
Browse files Browse the repository at this point in the history
… mode
  • Loading branch information
jmjuanes authored Nov 19, 2023
1 parent 65d47c5 commit 01b49f1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion components/Board.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const InnerBoard = React.forwardRef((props, ref) => {
{(board.state.contextMenuVisible && !isPresentation) && (
<ContextMenu onChange={props.onChange} />
)}
{props.showTools && !isScreenshot && (
{props.showTools && !isScreenshot && !isPresentation && (
<div className="absolute z-5" style={{bottom:"1rem",left:"50%",transform:"translateX(-50%)"}}>
<ToolsPanel
showSelect={!isPresentation}
Expand Down
17 changes: 10 additions & 7 deletions components/ToolsPanel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -213,13 +213,15 @@ export const ToolsPanel = props => {
</React.Fragment>
)}
{/* Actions */}
<PanelButton
testid="pointer"
text="Pointer"
icon={(<LaserPointerIcon />)}
active={board.activeAction === ACTIONS.POINTER}
onClick={props.onPointerClick}
/>
{props.showPointer && (
<PanelButton
testid="pointer"
text="Pointer"
icon={(<LaserPointerIcon />)}
active={board.activeAction === ACTIONS.POINTER}
onClick={props.onPointerClick}
/>
)}
<PanelButton
testid="drag"
text="Drag"
Expand Down Expand Up @@ -288,6 +290,7 @@ export const ToolsPanel = props => {

ToolsPanel.defaultProps = {
showTools: true,
showPointer: false,
showLock: true,
showSelect: true,
onMoveClick: null,
Expand Down

0 comments on commit 01b49f1

Please sign in to comment.