From 2541c2cd562251143050554f3c0117caed6d9345 Mon Sep 17 00:00:00 2001 From: bobzel Date: Tue, 12 Feb 2019 10:48:03 -0500 Subject: still struggling with sizing issues. --- src/client/views/collections/CollectionDockingView.tsx | 5 +++-- src/client/views/collections/CollectionFreeFormView.tsx | 2 +- src/client/views/nodes/ImageBox.scss | 3 ++- src/client/views/nodes/ImageBox.tsx | 3 +-- 4 files changed, 7 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionDockingView.tsx b/src/client/views/collections/CollectionDockingView.tsx index 15a586282..e3d50eb80 100644 --- a/src/client/views/collections/CollectionDockingView.tsx +++ b/src/client/views/collections/CollectionDockingView.tsx @@ -243,8 +243,9 @@ export class CollectionDockingView extends CollectionViewBase { setTimeout(function () { var htmlElement = document.getElementById(containingDiv); container.on('resize', (e: any) => { - state.doc.SetNumber(KeyStore.Width, htmlElement!.clientWidth); - state.doc.SetNumber(KeyStore.Height, htmlElement!.clientHeight); + // state.doc.SetNumber(KeyStore.Width, htmlElement!.clientWidth); + // if (htmlElement!.clientHeight > 0) + // state.doc.SetNumber(KeyStore.Height, htmlElement!.clientHeight); }) ReactDOM.render((
{this.props.BackgroundView} diff --git a/src/client/views/nodes/ImageBox.scss b/src/client/views/nodes/ImageBox.scss index 83392311b..2bd8b1d3c 100644 --- a/src/client/views/nodes/ImageBox.scss +++ b/src/client/views/nodes/ImageBox.scss @@ -1,7 +1,8 @@ .imageBox-cont { padding: 0vw; - position: absolute + position: absolute; + width: 100% } .imageBox-button { diff --git a/src/client/views/nodes/ImageBox.tsx b/src/client/views/nodes/ImageBox.tsx index b96e717ed..60be5f94d 100644 --- a/src/client/views/nodes/ImageBox.tsx +++ b/src/client/views/nodes/ImageBox.tsx @@ -85,11 +85,10 @@ export class ImageBox extends React.Component { let field = this.props.doc.Get(this.props.fieldKey); let path = field == FieldWaiting ? "https://image.flaticon.com/icons/svg/66/66163.svg" : field instanceof ImageField ? field.Data.href : "http://www.cs.brown.edu/~bcz/face.gif"; - let width = this.props.doc.GetNumber(KeyStore.Width, 1); return (
- Image not found + Image not found {this.lightbox(path)}
) } -- cgit v1.2.3-70-g09d2