diff options
author | bob <bcz@cs.brown.edu> | 2019-06-10 13:03:47 -0400 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2019-06-10 13:03:47 -0400 |
commit | c56851026c4054cde26ea36a9a24db14fac6c49c (patch) | |
tree | dba7d78e0d30a378d805a27c4f9b4360b822e812 /src/client/views/Templates.tsx | |
parent | a2742057084ac0c78ed5f360b1078b5b267eff1f (diff) |
fixes for treeview highlighting, templates, field deletion, overlaytext box positioning
Diffstat (limited to 'src/client/views/Templates.tsx')
-rw-r--r-- | src/client/views/Templates.tsx | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/client/views/Templates.tsx b/src/client/views/Templates.tsx index 8943bbcaf..3cd525afa 100644 --- a/src/client/views/Templates.tsx +++ b/src/client/views/Templates.tsx @@ -41,21 +41,13 @@ export namespace Templates { export const Caption = new Template("Caption", TemplatePosition.OutterBottom, `<div> - <div style="height:100%; width:100%;position:absolute;">{layout}</div> + <div style="height:100%; width:100%;">{layout}</div> <div style="bottom: 0; font-size:14px; width:100%; position:absolute"> - <FormattedTextBox {...props} fieldKey={"caption"} hideOnLeave={"true"} /> + <FormattedTextBox {...props} height="min-content" fieldKey={"caption"} hideOnLeave={"true"} /> </div> </div>` ); - export const ImageTitle = new Template("Image Title", TemplatePosition.InnerTop, - `<div style="height:100%"> - <div style="height:100%; width:100%;position:absolute;">{layout}</div> - <div style="height:25px; width:100%; position:absolute; top: 0; background-color: rgba(0, 0, 0, .4); color: white; "> - <span style="text-align:center;width:100%;font-size:20px;position:absolute;overflow:hidden;white-space:nowrap;text-overflow:ellipsis">{props.Document.title}</span> - </div> - </div>` ); - - export const TextTitle = new Template("Text Title", TemplatePosition.InnerTop, + export const Title = new Template("Title", TemplatePosition.InnerTop, `<div style="height:100%"> <div style="height:25px; width:100%; background-color: rgba(0, 0, 0, .4); color: white; "> <span style="text-align:center;width:100%;font-size:20px;position:absolute;overflow:hidden;white-space:nowrap;text-overflow:ellipsis">{props.Document.title}</span> @@ -92,7 +84,7 @@ export namespace Templates { </div > `); } - export const TemplateList: Template[] = [TextTitle, Header, ImageTitle, Caption, Bullet]; + export const TemplateList: Template[] = [Title, Header, Caption, Bullet]; export function sortTemplates(a: Template, b: Template) { if (a.Position < b.Position) { return -1; } |