aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DocumentContentsView.tsx
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-05-08 00:45:14 -0400
committerBob Zeleznik <zzzman@gmail.com>2019-05-08 00:45:14 -0400
commitd588a4543f1ccc06d1e45fe748007b730c18c042 (patch)
tree94991fa0166242205bcfe0cb3d251634a348352f /src/client/views/nodes/DocumentContentsView.tsx
parent26141a697ae52a7edf3cc6845ce2153111f8860e (diff)
small fixes to titles, templates, minimizing, and keyvalue deletion
Diffstat (limited to 'src/client/views/nodes/DocumentContentsView.tsx')
-rw-r--r--src/client/views/nodes/DocumentContentsView.tsx14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/client/views/nodes/DocumentContentsView.tsx b/src/client/views/nodes/DocumentContentsView.tsx
index bbc927b5a..1dc6343e8 100644
--- a/src/client/views/nodes/DocumentContentsView.tsx
+++ b/src/client/views/nodes/DocumentContentsView.tsx
@@ -64,10 +64,16 @@ export class DocumentContentsView extends React.Component<DocumentViewProps & {
let base = baseLayout;
let layout = baseLayout;
- this.templates.forEach(template => {
- layout = template.replace("{layout}", base);
- base = layout;
- });
+ // bcz: templates are intended for the main document layout. However,
+ // a DocumentContentsView is also used to render the annotation overlay for a document.
+ // So we detect that here by checking the layoutKey. This should probably be moved into
+ // a prop so that the overlay can explicitly turn off templates.
+ if (this.props.layoutKey !== "backgroundLayout") {
+ this.templates.forEach(template => {
+ layout = template.replace("{layout}", base);
+ base = layout;
+ });
+ }
return layout;
}