aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DocHolderBox.tsx
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2020-05-06 02:01:08 -0400
committerBob Zeleznik <zzzman@gmail.com>2020-05-06 02:01:08 -0400
commitfa826d828b0fc20afde675ffb060e4f24ca310d3 (patch)
treed4e3d9aadb867b7f3f2d407e69c17f72ee445a61 /src/client/views/nodes/DocHolderBox.tsx
parentd179ac9a6e01fb7d917b4b5fdb56374c697752ce (diff)
fixed makeClone to handle text hyperlinks fixed documentBox background color. fixed formattedtextbox sidebar clicking to sto propagation.
Diffstat (limited to 'src/client/views/nodes/DocHolderBox.tsx')
-rw-r--r--src/client/views/nodes/DocHolderBox.tsx5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/views/nodes/DocHolderBox.tsx b/src/client/views/nodes/DocHolderBox.tsx
index 17b2daabc..af8dc704c 100644
--- a/src/client/views/nodes/DocHolderBox.tsx
+++ b/src/client/views/nodes/DocHolderBox.tsx
@@ -122,6 +122,7 @@ export class DocHolderBox extends ViewBoxAnnotatableComponent<FieldViewProps, Do
ContainingCollectionView={this as any} // bcz: hack! need to pass a prop that can be used to select the container (ie, 'this') when the up selector in document decorations is clicked. currently, the up selector allows only a containing collection to be selected
ContainingCollectionDoc={undefined}
fitToBox={true}
+ backgroundColor={this.props.backgroundColor}
LayoutTemplateString={layoutTemplate}
LayoutTemplate={this.layoutTemplateDoc}
rootSelected={this.props.isSelected}
@@ -149,6 +150,7 @@ export class DocHolderBox extends ViewBoxAnnotatableComponent<FieldViewProps, Do
ContainingCollectionView={this as any} // bcz: hack! need to pass a prop that can be used to select the container (ie, 'this') when the up selector in document decorations is clicked. currently, the up selector allows only a containing collection to be selected
ContainingCollectionDoc={undefined}
fitToBox={true}
+ backgroundColor={this.props.backgroundColor}
ignoreAutoHeight={true}
LayoutTemplateString={layoutTemplate}
LayoutTemplate={this.layoutTemplateDoc}
@@ -174,12 +176,13 @@ export class DocHolderBox extends ViewBoxAnnotatableComponent<FieldViewProps, Do
return contents;
}
render() {
+ const containedDoc = Cast(this.dataDoc[this.fieldKey], Doc, null);
TraceMobx();
return <div className="documentBox-container" ref={this._contRef}
onContextMenu={this.specificContextMenu}
onPointerDown={this.onPointerDown} onClick={this.onClick}
style={{
- background: StrCast(this.layoutDoc.backgroundColor),
+ background: this.props.backgroundColor?.(containedDoc),
border: `#00000021 solid ${this.xPad}px`,
borderTop: `#0000005e solid ${this.yPad}px`,
borderBottom: `#0000005e solid ${this.yPad}px`,