aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/ImageBox.tsx
diff options
context:
space:
mode:
authorMohammad Amoush <mohammad_amoush@brown.edu>2019-07-24 18:58:00 -0400
committerMohammad Amoush <mohammad_amoush@brown.edu>2019-07-24 18:58:00 -0400
commitd55496fda9b8eb950d807bdb3e561d932719e92c (patch)
tree74aab4c0c8722999df4a0877a01730c5b3605765 /src/client/views/nodes/ImageBox.tsx
parent7844debd9862b15d2b36bf9ce1efb3274616a313 (diff)
parent6a296f80672c7e9d0f9c634baed7dc488426de0b (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into presentation-preview-mohammad
Diffstat (limited to 'src/client/views/nodes/ImageBox.tsx')
-rw-r--r--src/client/views/nodes/ImageBox.tsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client/views/nodes/ImageBox.tsx b/src/client/views/nodes/ImageBox.tsx
index 0f60bd0fb..89ad18dd6 100644
--- a/src/client/views/nodes/ImageBox.tsx
+++ b/src/client/views/nodes/ImageBox.tsx
@@ -355,7 +355,7 @@ export class ImageBox extends DocComponent<FieldViewProps, ImageDocument>(ImageD
let rotation = NumCast(this.dataDoc.rotation, 0);
let aspect = (rotation % 180) ? this.dataDoc[HeightSym]() / this.dataDoc[WidthSym]() : 1;
let shift = (rotation % 180) ? (nativeHeight - nativeWidth / aspect) / 2 : 0;
- let srcpath = paths[Math.min(paths.length, this.Document.curPage || 0)];
+ let srcpath = paths[Math.min(paths.length - 1, this.Document.curPage || 0)];
if (!this.props.Document.ignoreAspect && !this.props.leaveNativeSize) this.resize(srcpath, this.props.Document);