aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/ImageBox.tsx
diff options
context:
space:
mode:
authorTyler Schicke <tyler_schicke@brown.edu>2019-07-29 16:10:13 -0400
committerTyler Schicke <tyler_schicke@brown.edu>2019-07-29 16:10:13 -0400
commita560acaf539c058a2918a12e5de5061cca4b19e2 (patch)
tree3895ce8ce7dc1f3f2a41c1a82b410879d10858aa /src/client/views/nodes/ImageBox.tsx
parent5d68a57121ac35339d5e223f5dc40ebfd414fd0f (diff)
Bunch of fixes
Diffstat (limited to 'src/client/views/nodes/ImageBox.tsx')
-rw-r--r--src/client/views/nodes/ImageBox.tsx6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/views/nodes/ImageBox.tsx b/src/client/views/nodes/ImageBox.tsx
index 29a76b0c8..82af4b4ca 100644
--- a/src/client/views/nodes/ImageBox.tsx
+++ b/src/client/views/nodes/ImageBox.tsx
@@ -96,7 +96,11 @@ export class ImageBox extends DocComponent<FieldViewProps, ImageDocument>(ImageD
this.props.Document.width = drop.width;
this.props.Document.height = drop.height;
Doc.GetProto(this.props.Document).type = DocumentType.TEMPLATE;
- this.props.Document.layout = temp;
+ if (this.props.DataDoc && this.props.DataDoc.layout === this.props.Document) {
+ this.props.DataDoc.layout = temp;
+ } else {
+ this.props.Document.layout = temp;
+ }
e.stopPropagation();
} else if (de.mods === "AltKey" && /*this.dataDoc !== this.props.Document &&*/ drop.data instanceof ImageField) {
Doc.GetProto(this.dataDoc)[this.props.fieldKey] = new ImageField(drop.data.url);