aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/search
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-07-11 11:00:09 -0400
committerbob <bcz@cs.brown.edu>2019-07-11 11:00:09 -0400
commita9ecaef0c7d870136401dfbb687afdb9dd2843f4 (patch)
treee92499439a8c2c3f19defb2fca723b208ce47ca3 /src/client/views/search
parent35f581ce1beef665265688551f50ca4cd51fd62a (diff)
fixed fitToBox stuff.
Diffstat (limited to 'src/client/views/search')
-rw-r--r--src/client/views/search/SearchItem.tsx6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/client/views/search/SearchItem.tsx b/src/client/views/search/SearchItem.tsx
index 87cae5487..c34e4febd 100644
--- a/src/client/views/search/SearchItem.tsx
+++ b/src/client/views/search/SearchItem.tsx
@@ -104,10 +104,6 @@ export class SearchItem extends React.Component<SearchItemProps> {
@observable _useIcons = true;
@observable _displayDim = 50;
- fitToBox = () => {
- let bounds = Doc.ComputeContentBounds(this.props.doc);
- return [(bounds.x + bounds.r) / 2, (bounds.y + bounds.b) / 2, Number(SEARCH_THUMBNAIL_SIZE) / Math.max((bounds.b - bounds.y), (bounds.r - bounds.x)), this._displayDim];
- }
@computed
public get DocumentIcon() {
if (!this._useIcons) {
@@ -119,7 +115,7 @@ export class SearchItem extends React.Component<SearchItemProps> {
onPointerEnter={action(() => this._displayDim = this._useIcons ? 50 : Number(SEARCH_THUMBNAIL_SIZE))}
onPointerLeave={action(() => this._displayDim = 50)} >
<DocumentView
- fitToBox={StrCast(this.props.doc.type).indexOf(DocTypes.COL) !== -1 ? this.fitToBox : undefined}
+ fitToBox={StrCast(this.props.doc.type).indexOf(DocTypes.COL) !== -1}
Document={this.props.doc}
addDocument={returnFalse}
removeDocument={returnFalse}