aboutsummaryrefslogtreecommitdiff
path: root/src/client/documents/Documents.ts
diff options
context:
space:
mode:
authorlaurawilsonri <laura_wilson@brown.edu>2019-02-25 20:11:37 -0500
committerlaurawilsonri <laura_wilson@brown.edu>2019-02-25 20:11:37 -0500
commit3ef178ab23eae665a7323ae54e14114a2b6e656e (patch)
tree5f97a342f4e1e8d322035158e53eaf4bd4774305 /src/client/documents/Documents.ts
parent171852260c04ba7aafd789b231d98cdaa2a7dc8d (diff)
parent292ff1a8d75f8b15f9388d2c577e09a13836d5dc (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into improveText
Diffstat (limited to 'src/client/documents/Documents.ts')
-rw-r--r--src/client/documents/Documents.ts10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/client/documents/Documents.ts b/src/client/documents/Documents.ts
index 4c5f26fbd..15ecfbfe6 100644
--- a/src/client/documents/Documents.ts
+++ b/src/client/documents/Documents.ts
@@ -112,9 +112,7 @@ export namespace Documents {
imageProto.Set(KeyStore.X, new NumberField(0));
imageProto.Set(KeyStore.Y, new NumberField(0));
imageProto.Set(KeyStore.NativeWidth, new NumberField(300));
- imageProto.Set(KeyStore.NativeHeight, new NumberField(300));
imageProto.Set(KeyStore.Width, new NumberField(300));
- imageProto.Set(KeyStore.Height, new NumberField(300));
imageProto.Set(KeyStore.Layout, new TextField(CollectionView.LayoutString("AnnotationsKey")));
imageProto.SetNumber(KeyStore.ViewType, CollectionViewType.Freeform)
imageProto.Set(KeyStore.BackgroundLayout, new TextField(ImageBox.LayoutString()));
@@ -128,8 +126,8 @@ export namespace Documents {
// example of custom display string for an image that shows a caption.
function EmbeddedCaption() {
- return `<div style="position:absolute; height:100%">
- <div style="position:relative; margin:auto; width:85%; margin:auto" >`
+ return `<div style="height:100%">
+ <div style="position:relative; margin:auto; height:85%;" >`
+ ImageBox.LayoutString() +
`</div>
<div style="position:relative; overflow:auto; height:15%; text-align:center; ">`
@@ -151,9 +149,7 @@ export namespace Documents {
doc.Set(KeyStore.BackgroundLayout, new TextField(EmbeddedCaption()));
doc.Set(KeyStore.OverlayLayout, new TextField(FixedCaption()));
doc.Set(KeyStore.LayoutKeys, new ListField([KeyStore.Data, KeyStore.Annotations, KeyStore.Caption]));
-
- let annotation = Documents.TextDocument({ title: "hello" });
- doc.Set(KeyStore.Annotations, new ListField([annotation]));
+ console.log("" + doc.GetNumber(KeyStore.Height, 311));
return doc;
}