aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/presentationview/PresElementBox.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-11-03 14:30:18 -0500
committerGitHub <noreply@github.com>2020-11-03 14:30:18 -0500
commit662f6caf1fade18abc2a24528c3057d43da1a504 (patch)
tree87bd0d5b7e06e46b6ac04b74b105bc2dca6184b6 /src/client/views/presentationview/PresElementBox.tsx
parenteacb4733e85ada91520fe401f5c1351f7bbc38d4 (diff)
parent5372e9b221aa72f7dfa22121ce8a4d85573da8cf (diff)
Merge pull request #925 from browngraphicslab/presentation_v1
Presentation v1
Diffstat (limited to 'src/client/views/presentationview/PresElementBox.tsx')
-rw-r--r--src/client/views/presentationview/PresElementBox.tsx8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/client/views/presentationview/PresElementBox.tsx b/src/client/views/presentationview/PresElementBox.tsx
index b2acad86e..7b4afeb69 100644
--- a/src/client/views/presentationview/PresElementBox.tsx
+++ b/src/client/views/presentationview/PresElementBox.tsx
@@ -275,6 +275,7 @@ export class PresElementBox extends ViewBoxBaseComponent<FieldViewProps, PresDoc
const presBoxDocView = DocumentManager.Instance.getDocumentView(this.presBox);
let width: number = NumCast(this.presBox._width);
if (presBoxDocView) width = presBoxDocView.props.PanelWidth();
+ if (width === 0) width = 300;
return width;
}
@@ -282,7 +283,7 @@ export class PresElementBox extends ViewBoxBaseComponent<FieldViewProps, PresDoc
const isSelected: boolean = PresBox.Instance._selectedArray.has(this.rootDoc);
const toolbarWidth: number = this.toolbarWidth;
const showMore: boolean = this.toolbarWidth >= 300;
- const miniView: boolean = this.toolbarWidth <= 100;
+ const miniView: boolean = this.toolbarWidth <= 110;
const targetDoc: Doc = this.targetDoc;
const activeItem: Doc = this.rootDoc;
return (
@@ -312,11 +313,12 @@ export class PresElementBox extends ViewBoxBaseComponent<FieldViewProps, PresDoc
{`${this.indexInPres + 1}.`}
</div>}
{miniView ? (null) : <div ref={miniView ? null : this._dragRef} className={`presItem-slide ${isSelected ? "active" : ""}`} style={{ backgroundColor: this.props.backgroundColor?.(this.layoutDoc, this.props.renderDepth) }}>
- <div className="presItem-name" style={{ maxWidth: showMore ? (toolbarWidth - 175) : toolbarWidth - 85, cursor: isSelected ? 'text' : 'grab' }}>
+ <div className="presItem-name" style={{ maxWidth: showMore ? (toolbarWidth - 185) : toolbarWidth - 95, cursor: isSelected ? 'text' : 'grab' }}>
<EditableView
ref={this._titleRef}
editing={!isSelected ? false : undefined}
contents={activeItem.title}
+ overflow={'ellipsis'}
GetValue={() => StrCast(activeItem.title)}
SetValue={this.onSetValue}
/>
@@ -345,7 +347,7 @@ export class PresElementBox extends ViewBoxBaseComponent<FieldViewProps, PresDoc
<FontAwesomeIcon icon={"trash"} onPointerDown={e => e.stopPropagation()} />
</div></Tooltip>
</div>
- <div className="presItem-docName" style={{ maxWidth: showMore ? (toolbarWidth - 175) : toolbarWidth - 85 }}>{activeItem.presPinView ? (<><i>View of </i> {targetDoc.title}</>) : targetDoc.title}</div>
+ <div className="presItem-docName" style={{ maxWidth: showMore ? (toolbarWidth - 185) : toolbarWidth - 95 }}>{activeItem.presPinView ? (<><i>View of </i> {targetDoc.title}</>) : targetDoc.title}</div>
{this.renderEmbeddedInline}
</div>}
</div >);