Skip to content

Commit

Permalink
Remove rotate button in demo
Browse files Browse the repository at this point in the history
  • Loading branch information
ericmarsh995 committed Oct 13, 2023
1 parent 1985515 commit d827070
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions ui/demo/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@ import {
DownloadButton,
PageNumberControl,
PrintButton,
rotateClockwise,
rotateCounterClockwise,
scrollToId,
TransformContext,
UiContext,
} from '@allenai/pdf-components';
import classnames from 'classnames';
Expand All @@ -27,7 +24,6 @@ export const Header: React.FunctionComponent<Props> = ({ pdfUrl }: Props) => {
setIsShowingTextHighlight,
setIsShowingThumbnail,
} = React.useContext(UiContext);
const { rotation, setRotation } = React.useContext(TransformContext);
const { isShowingNoteTaking, setIsShowingNoteTaking } = React.useContext(DemoHeaderContext);

const handleShowOutline = React.useCallback(() => {
Expand All @@ -38,14 +34,6 @@ export const Header: React.FunctionComponent<Props> = ({ pdfUrl }: Props) => {
setIsShowingThumbnail(true);
}, []);

const handleRotateCW = React.useCallback(() => {
setRotation(rotateClockwise(rotation));
}, [rotation]);

const handleRotateCCW = React.useCallback(() => {
setRotation(rotateCounterClockwise(rotation));
}, [rotation]);

const handleToggleHighlightOverlay = React.useCallback(() => {
setIsShowingHighlightOverlay(!isShowingHighlightOverlay);
}, [isShowingHighlightOverlay]);
Expand Down Expand Up @@ -74,11 +62,6 @@ export const Header: React.FunctionComponent<Props> = ({ pdfUrl }: Props) => {
<div className="header-control">
<SimpleZoomControl />
</div>
<div className="header-control">
Rotate
<a onClick={handleRotateCW}></a>
<a onClick={handleRotateCCW}></a>
</div>
<div className="header-control">
<a onClick={handleShowOutline}>Outline</a>
</div>
Expand Down

0 comments on commit d827070

Please sign in to comment.