diff options
author | Sam Wilkins <samwilkins333@gmail.com> | 2019-07-24 22:48:46 -0400 |
---|---|---|
committer | Sam Wilkins <samwilkins333@gmail.com> | 2019-07-24 22:48:46 -0400 |
commit | e9f5a7a005ce24e85bc2b97157bd2da416c786b9 (patch) | |
tree | 44255cfefcd878f4d72af00119e317b36d646d1c /src/client/views/nodes/ImageBox.tsx | |
parent | ab78fa317bdbcf6fcbceb35586604d90c7277446 (diff) | |
parent | d344bb81c43820d606655a4f78dbaedc66ab3638 (diff) |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web
Diffstat (limited to 'src/client/views/nodes/ImageBox.tsx')
-rw-r--r-- | src/client/views/nodes/ImageBox.tsx | 2 |
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); |