aboutsummaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorTyler Schicke <tyler_schicke@brown.edu>2019-07-24 17:25:24 -0400
committerTyler Schicke <tyler_schicke@brown.edu>2019-07-24 17:25:24 -0400
commit6a296f80672c7e9d0f9c634baed7dc488426de0b (patch)
treefa3f7046da7719c9023199f8e91356acfcbcfb71 /src/client
parent4c9c8375dc5f36f29cc38ba79b379b7a75e4a1a5 (diff)
parent20d8950b0b3adb676de5ef4c2d625d57de38a9b4 (diff)
Merge branch 'master' of github-tsch-brown:browngraphicslab/Dash-Web
Diffstat (limited to 'src/client')
-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);