Skip to content

Commit

Permalink
Remove support for deprecated enhanceTextSelection prop
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekmaj committed Oct 7, 2022
1 parent b32889d commit f52fcf7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 10 deletions.
3 changes: 0 additions & 3 deletions src/Page.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ export class PageInternal extends PureComponent {
const {
canvasBackground,
customTextRenderer,
enhanceTextSelection,
onGetAnnotationsError,
onGetAnnotationsSuccess,
onGetTextError,
Expand All @@ -97,7 +96,6 @@ export class PageInternal extends PureComponent {
return {
canvasBackground,
customTextRenderer,
enhanceTextSelection,
onGetAnnotationsError,
onGetAnnotationsSuccess,
onGetTextError,
Expand Down Expand Up @@ -380,7 +378,6 @@ PageInternal.propTypes = {
children: PropTypes.node,
className: isClassName,
customTextRenderer: PropTypes.func,
enhanceTextSelection: PropTypes.bool,
error: isFunctionOrNode,
height: PropTypes.number,
imageResourcesPath: PropTypes.string,
Expand Down
8 changes: 1 addition & 7 deletions src/Page/TextLayer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,13 @@ export class TextLayerInternal extends PureComponent {
}

const { viewport } = this;
const { customTextRenderer, enhanceTextSelection } = this.props;
const { customTextRenderer } = this.props;

// If another rendering is in progress, let's cancel it
cancelRunningTask(this.runningTask);

const parameters = {
container: this.layerElement.current,
enhanceTextSelection,
textContent,
viewport,
};
Expand Down Expand Up @@ -167,13 +166,8 @@ export class TextLayerInternal extends PureComponent {
}
}

TextLayerInternal.defaultProps = {
enhanceTextSelection: true,
};

TextLayerInternal.propTypes = {
customTextRenderer: PropTypes.func,
enhanceTextSelection: PropTypes.bool,
onGetTextError: PropTypes.func,
onGetTextSuccess: PropTypes.func,
onRenderTextLayerError: PropTypes.func,
Expand Down

0 comments on commit f52fcf7

Please sign in to comment.