diff options
| author | laurawilsonri <laura_wilson@brown.edu> | 2019-03-19 16:50:19 -0400 |
|---|---|---|
| committer | laurawilsonri <laura_wilson@brown.edu> | 2019-03-19 16:50:19 -0400 |
| commit | 7f65273917913d9e71fe73da66131888fb8d1020 (patch) | |
| tree | 63da9ce79cc72752840c78a8ff6fae2f313ca1df /src/client/documents | |
| parent | f2fa6d6d28f2011a13f9034f5685b08301c291e4 (diff) | |
| parent | 9eff1894078c0cbf5592646acb5e20e5761fc167 (diff) | |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into editableSchema
Diffstat (limited to 'src/client/documents')
| -rw-r--r-- | src/client/documents/Documents.ts | 41 |
1 files changed, 38 insertions, 3 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts index fabdaad17..4ed1fc3ed 100644 --- a/src/client/documents/Documents.ts +++ b/src/client/documents/Documents.ts @@ -221,16 +221,51 @@ export namespace Documents { `</div> </div>` }; - function Caption() { + function OuterCaption() { return (` <div> - <div style="margin:auto; height:85%; width:85%;"> + <div style="margin:auto; height:calc(100%); width:100%;"> {layout} </div> - <div style="height:15%; width:100%; position:absolute"> + <div style="height:(100% + 25px); width:100%; position:absolute"> <FormattedTextBox doc={Document} DocumentViewForField={DocumentView} bindings={bindings} fieldKey={"CaptionKey"} isSelected={isSelected} select={select} selectOnLoad={SelectOnLoad} isTopMost={isTopMost}/> </div> </div> `) } + function InnerCaption() { + return (` + <div> + <div style="margin:auto; height:calc(100% - 25px); width:100%;"> + {layout} + </div> + <div style="height:25px; width:100%; position:absolute"> + <FormattedTextBox doc={Document} DocumentViewForField={DocumentView} bindings={bindings} fieldKey={"CaptionKey"} isSelected={isSelected} select={select} selectOnLoad={SelectOnLoad} isTopMost={isTopMost}/> + </div> + </div> + `) + } + + /* + + this template requires an additional style setting on the collectionView-cont to make the layout relative + +.collectionView-cont { + position: relative; + width: 100%; + height: 100%; +} + */ + function Percentaption() { + return (` + <div> + <div style="margin:auto; height:85%; width:85%;"> + {layout} + </div> + <div style="height:15%; width:100%; position:absolute"> + <FormattedTextBox doc={Document} DocumentViewForField={DocumentView} bindings={bindings} fieldKey={"CaptionKey"} isSelected={isSelected} select={select} selectOnLoad={SelectOnLoad} isTopMost={isTopMost}/> + </div> + </div> + `) + } }
\ No newline at end of file |
