aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionMulticolumn
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/collections/collectionMulticolumn')
-rw-r--r--src/client/views/collections/collectionMulticolumn/CollectionMulticolumnView.scss4
-rw-r--r--src/client/views/collections/collectionMulticolumn/CollectionMulticolumnView.tsx122
-rw-r--r--src/client/views/collections/collectionMulticolumn/CollectionMultirowView.scss7
-rw-r--r--src/client/views/collections/collectionMulticolumn/CollectionMultirowView.tsx116
4 files changed, 122 insertions, 127 deletions
diff --git a/src/client/views/collections/collectionMulticolumn/CollectionMulticolumnView.scss b/src/client/views/collections/collectionMulticolumn/CollectionMulticolumnView.scss
index cb0d5e03f..f983fd815 100644
--- a/src/client/views/collections/collectionMulticolumn/CollectionMulticolumnView.scss
+++ b/src/client/views/collections/collectionMulticolumn/CollectionMulticolumnView.scss
@@ -1,6 +1,6 @@
.collectionMulticolumnView_contents {
display: flex;
- overflow: hidden;
+ //overflow: hidden; // bcz: turned of to allow highlighting to appear when there is no border (e.g, for a component of the slide template)
width: 100%;
height: 100%;
@@ -17,7 +17,7 @@
}
.contentFittingDocumentView {
- width: unset;
+ margin: auto;
}
.label-wrapper {
diff --git a/src/client/views/collections/collectionMulticolumn/CollectionMulticolumnView.tsx b/src/client/views/collections/collectionMulticolumn/CollectionMulticolumnView.tsx
index c2586fb4b..e12bcd8b0 100644
--- a/src/client/views/collections/collectionMulticolumn/CollectionMulticolumnView.tsx
+++ b/src/client/views/collections/collectionMulticolumn/CollectionMulticolumnView.tsx
@@ -1,7 +1,7 @@
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { Tooltip } from '@mui/material';
import { Button } from 'browndash-components';
-import { action, computed } from 'mobx';
+import { action, computed, makeObservable } from 'mobx';
import { observer } from 'mobx-react';
import * as React from 'react';
import { Doc, DocListCast } from '../../../../fields/Doc';
@@ -37,6 +37,11 @@ const resizerWidth = 8;
@observer
export class CollectionMulticolumnView extends CollectionSubView() {
+ constructor(props: any) {
+ super(props);
+ makeObservable(this);
+ }
+
/**
* @returns the list of layout documents whose width unit is
* *, denoting that it will be displayed with a ratio, not fixed pixel, value
@@ -122,7 +127,7 @@ export class CollectionMulticolumnView extends CollectionSubView() {
private get totalRatioAllocation(): number | undefined {
const layoutInfoLen = this.resolvedLayoutInformation.widthSpecifiers.length;
if (layoutInfoLen > 0 && this.totalFixedAllocation !== undefined) {
- return this.props.PanelWidth() - (this.totalFixedAllocation + resizerWidth * (layoutInfoLen - 1)) - 2 * NumCast(this.props.Document._xMargin);
+ return this._props.PanelWidth() - (this.totalFixedAllocation + resizerWidth * (layoutInfoLen - 1)) - 2 * NumCast(this._props.Document._xMargin);
}
}
@@ -184,7 +189,7 @@ export class CollectionMulticolumnView extends CollectionSubView() {
let offset = 0;
for (const { layout: candidate } of this.childLayoutPairs) {
if (candidate === layout) {
- return this.props.ScreenToLocalTransform().translate(-offset / (this.props.NativeDimScaling?.() || 1), 0);
+ return this._props.ScreenToLocalTransform().translate(-offset / (this._props.NativeDimScaling?.() || 1), 0);
}
offset += this.lookupPixels(candidate) + resizerWidth;
}
@@ -192,7 +197,6 @@ export class CollectionMulticolumnView extends CollectionSubView() {
};
@undoBatch
- @action
onInternalDrop = (e: Event, de: DragManager.DropEvent) => {
let dropInd = -1;
if (de.complete.docDragData && this._mainCont) {
@@ -219,8 +223,8 @@ export class CollectionMulticolumnView extends CollectionSubView() {
if (this.childDocs.includes(d)) {
if (dropInd > this.childDocs.indexOf(d)) dropInd--;
}
- Doc.RemoveDocFromList(this.rootDoc, this.props.fieldKey, d);
- Doc.AddDocToList(this.rootDoc, this.props.fieldKey, d, DocListCast(this.rootDoc[this.props.fieldKey])[dropInd], undefined, dropInd === -1);
+ Doc.RemoveDocFromList(this.dataDoc, this._props.fieldKey, d);
+ Doc.AddDocToList(this.dataDoc, this._props.fieldKey, d, DocListCast(this.dataDoc[this._props.fieldKey])[dropInd], undefined, dropInd === -1);
}
})
);
@@ -233,51 +237,58 @@ export class CollectionMulticolumnView extends CollectionSubView() {
onChildClickHandler = () => ScriptCast(this.Document.onChildClick);
onChildDoubleClickHandler = () => ScriptCast(this.Document.onChildDoubleClick);
- isContentActive = () => this.props.isSelected() || this.props.isContentActive() || this.props.isAnyChildContentActive();
+ isContentActive = () => this._props.isSelected() || this._props.isContentActive() || this._props.isAnyChildContentActive();
isChildContentActive = () => {
- const childDocsActive = this.props.childDocumentsActive?.() ?? this.rootDoc.childDocumentsActive;
- return this.props.isContentActive?.() === false || childDocsActive === false
+ const childDocsActive = this._props.childDocumentsActive?.() ?? this.Document.childDocumentsActive;
+ return this._props.isContentActive?.() === false || childDocsActive === false
? false //
- : this.props.isDocumentActive?.() && childDocsActive
- ? true
- : undefined;
+ : this._props.isDocumentActive?.() && childDocsActive
+ ? true
+ : undefined;
};
- getDisplayDoc = (layout: Doc, dxf: () => Transform, width: () => number, height: () => number, shouldNotScale: () => boolean) => {
+ getDisplayDoc = (childLayout: Doc) => {
+ const width = () => this.lookupPixels(childLayout);
+ const height = () => this._props.PanelHeight() - 2 * NumCast(this.layoutDoc._yMargin) - (BoolCast(this.layoutDoc.showWidthLabels) ? 20 : 0);
+ const dxf = () =>
+ this.lookupIndividualTransform(childLayout)
+ .translate(-NumCast(this.layoutDoc._xMargin), -NumCast(this.layoutDoc._yMargin))
+ .scale(this._props.NativeDimScaling?.() || 1);
+ const shouldNotScale = () => this._props.fitContentsToBox?.() || BoolCast(childLayout.freeform_fitContentsToBox);
return (
<DocumentView
- Document={layout}
- DataDoc={layout.resolvedDataDoc as Doc}
- styleProvider={this.props.styleProvider}
- docViewPath={this.props.docViewPath}
- LayoutTemplate={this.props.childLayoutTemplate}
- LayoutTemplateString={this.props.childLayoutString}
- renderDepth={this.props.renderDepth + 1}
+ Document={childLayout}
+ TemplateDataDocument={childLayout.resolvedDataDoc as Doc}
+ styleProvider={this._props.styleProvider}
+ docViewPath={this._props.docViewPath}
+ LayoutTemplate={this._props.childLayoutTemplate}
+ LayoutTemplateString={this._props.childLayoutString}
+ renderDepth={this._props.renderDepth + 1}
PanelWidth={width}
PanelHeight={height}
- shouldNotScale={shouldNotScale}
rootSelected={this.rootSelected}
- dragAction={(this.props.Document.childDragAction ?? this.props.childDragAction) as dropActionType}
+ dragAction={(this._props.Document.childDragAction ?? this._props.childDragAction) as dropActionType}
onClick={this.onChildClickHandler}
onDoubleClick={this.onChildDoubleClickHandler}
suppressSetHeight={true}
ScreenToLocalTransform={dxf}
isContentActive={this.isChildContentActive}
- isDocumentActive={this.props.childDocumentsActive?.() || this.Document._childDocumentsActive ? this.props.isDocumentActive : this.isContentActive}
- hideResizeHandles={this.props.childHideResizeHandles?.()}
- hideDecorationTitle={this.props.childHideDecorationTitle?.()}
- fitContentsToBox={this.props.fitContentsToBox}
- focus={this.props.focus}
+ isDocumentActive={this._props.childDocumentsActive?.() || this.Document._childDocumentsActive ? this._props.isDocumentActive : this.isContentActive}
+ hideResizeHandles={childLayout.layout_fitWidth || this._props.childHideResizeHandles ? true : false}
+ hideDecorationTitle={this._props.childHideDecorationTitle}
+ fitContentsToBox={this._props.fitContentsToBox}
+ focus={this._props.focus}
childFilters={this.childDocFilters}
childFiltersByRanges={this.childDocRangeFilters}
searchFilterDocs={this.searchFilterDocs}
- dontRegisterView={this.props.dontRegisterView}
- addDocument={this.props.addDocument}
- moveDocument={this.props.moveDocument}
- removeDocument={this.props.removeDocument}
- whenChildContentsActiveChanged={this.props.whenChildContentsActiveChanged}
- addDocTab={this.props.addDocTab}
- pinToPres={this.props.pinToPres}
+ dontRegisterView={this._props.dontRegisterView}
+ addDocument={this._props.addDocument}
+ moveDocument={this._props.moveDocument}
+ removeDocument={this._props.removeDocument}
+ whenChildContentsActiveChanged={this._props.whenChildContentsActiveChanged}
+ addDocTab={this._props.addDocTab}
+ pinToPres={this._props.pinToPres}
bringToFront={returnFalse}
+ dontCenter={StrCast(this.layoutDoc.layout_dontCenter) as any} // 'y', 'x', 'xy'
/>
);
};
@@ -288,34 +299,23 @@ export class CollectionMulticolumnView extends CollectionSubView() {
@computed
private get contents(): JSX.Element[] | null {
const { childLayoutPairs } = this;
- const { Document, PanelHeight } = this.props;
const collector: JSX.Element[] = [];
for (let i = 0; i < childLayoutPairs.length; i++) {
const { layout } = childLayoutPairs[i];
- const aspect = Doc.NativeAspect(layout, undefined, true);
- const width = () => this.lookupPixels(layout);
- const height = () => PanelHeight() - 2 * NumCast(Document._yMargin) - (BoolCast(Document.showWidthLabels) ? 20 : 0);
- const docwidth = () => (layout._layout_reflowHorizontal ? width() : Math.min(height() * aspect, width()));
- const docheight = () => Math.min(docwidth() / aspect, height());
- const dxf = () =>
- this.lookupIndividualTransform(layout)
- .translate(-NumCast(Document._xMargin) - (width() - docwidth()) / 2, -NumCast(Document._yMargin))
- .scale(this.props.NativeDimScaling?.() || 1);
- const shouldNotScale = () => this.props.fitContentsToBox?.() || BoolCast(layout.freeform_fitContentsToBox);
collector.push(
- <Tooltip title={'Tab: ' + StrCast(layout.title)}>
- <div className="document-wrapper" key={'wrapper' + i} style={{ width: width() }}>
- {this.getDisplayDoc(layout, dxf, docwidth, docheight, shouldNotScale)}
- <Button tooltip="Remove document from header bar" icon={<FontAwesomeIcon icon="times" size="lg" />} onClick={undoable(e => this.props.removeDocument?.(layout), 'close doc')} color={SettingsManager.userColor} />
- <WidthLabel layout={layout} collectionDoc={Document} />
+ <Tooltip title={'Tab: ' + StrCast(layout.title)} key={'wrapper' + i}>
+ <div className="document-wrapper" style={{ flexDirection: 'column', width: this.lookupPixels(layout) }}>
+ {this.getDisplayDoc(layout)}
+ <Button tooltip="Remove document from header bar" icon={<FontAwesomeIcon icon="times" size="lg" />} onClick={undoable(e => this._props.removeDocument?.(layout), 'close doc')} color={SettingsManager.userColor} />
+ <WidthLabel layout={layout} collectionDoc={this.Document} />
</div>
</Tooltip>,
<ResizeBar
width={resizerWidth}
key={'resizer' + i}
- styleProvider={this.props.styleProvider}
- isContentActive={this.props.isContentActive}
- select={this.props.select}
+ styleProvider={this._props.styleProvider}
+ isContentActive={this._props.isContentActive}
+ select={this._props.select}
columnUnitLength={this.getColumnUnitLength}
toLeft={layout}
toRight={childLayoutPairs[i + 1]?.layout}
@@ -326,18 +326,18 @@ export class CollectionMulticolumnView extends CollectionSubView() {
return collector;
}
- render(): JSX.Element {
+ render() {
return (
<div
- className={'collectionMulticolumnView_contents'}
+ className="collectionMulticolumnView_contents"
ref={this.createDashEventsTarget}
style={{
- width: `calc(100% - ${2 * NumCast(this.props.Document._xMargin)}px)`,
- height: `calc(100% - ${2 * NumCast(this.props.Document._yMargin)}px)`,
- marginLeft: NumCast(this.props.Document._xMargin),
- marginRight: NumCast(this.props.Document._xMargin),
- marginTop: NumCast(this.props.Document._yMargin),
- marginBottom: NumCast(this.props.Document._yMargin),
+ width: `calc(100% - ${2 * NumCast(this.Document._xMargin)}px)`,
+ height: `calc(100% - ${2 * NumCast(this.Document._yMargin)}px)`,
+ marginLeft: NumCast(this.Document._xMargin),
+ marginRight: NumCast(this.Document._xMargin),
+ marginTop: NumCast(this.Document._yMargin),
+ marginBottom: NumCast(this.Document._yMargin),
}}>
{this.contents}
</div>
diff --git a/src/client/views/collections/collectionMulticolumn/CollectionMultirowView.scss b/src/client/views/collections/collectionMulticolumn/CollectionMultirowView.scss
index ec7200a03..f44eacb2a 100644
--- a/src/client/views/collections/collectionMulticolumn/CollectionMultirowView.scss
+++ b/src/client/views/collections/collectionMulticolumn/CollectionMultirowView.scss
@@ -1,6 +1,6 @@
.collectionMultirowView_contents {
display: flex;
- overflow: hidden;
+ //overflow: hidden; // bcz: turned of to allow highlighting to appear when there is no border (e.g, for a component of the slide template)
width: 100%;
height: 100%;
flex-direction: column;
@@ -10,11 +10,6 @@
flex-direction: row;
height: 100%;
align-items: center;
- margin: auto;
-
- .contentFittingDocumentView {
- height: unset;
- }
.label-wrapper {
display: flex;
diff --git a/src/client/views/collections/collectionMulticolumn/CollectionMultirowView.tsx b/src/client/views/collections/collectionMulticolumn/CollectionMultirowView.tsx
index 249c3551b..7dbc18e60 100644
--- a/src/client/views/collections/collectionMulticolumn/CollectionMultirowView.tsx
+++ b/src/client/views/collections/collectionMulticolumn/CollectionMultirowView.tsx
@@ -1,4 +1,4 @@
-import { action, computed } from 'mobx';
+import { action, computed, makeObservable } from 'mobx';
import { observer } from 'mobx-react';
import * as React from 'react';
import { Doc, DocListCast } from '../../../../fields/Doc';
@@ -33,6 +33,11 @@ const resizerHeight = 8;
@observer
export class CollectionMultirowView extends CollectionSubView() {
+ constructor(props: any) {
+ super(props);
+ makeObservable(this);
+ }
+
/**
* @returns the list of layout documents whose width unit is
* *, denoting that it will be displayed with a ratio, not fixed pixel, value
@@ -118,7 +123,7 @@ export class CollectionMultirowView extends CollectionSubView() {
private get totalRatioAllocation(): number | undefined {
const layoutInfoLen = this.resolvedLayoutInformation.heightSpecifiers.length;
if (layoutInfoLen > 0 && this.totalFixedAllocation !== undefined) {
- return this.props.PanelHeight() - (this.totalFixedAllocation + resizerHeight * (layoutInfoLen - 1)) - 2 * NumCast(this.props.Document._yMargin);
+ return this._props.PanelHeight() - (this.totalFixedAllocation + resizerHeight * (layoutInfoLen - 1)) - 2 * NumCast(this._props.Document._yMargin);
}
}
@@ -180,7 +185,7 @@ export class CollectionMultirowView extends CollectionSubView() {
let offset = 0;
for (const { layout: candidate } of this.childLayoutPairs) {
if (candidate === layout) {
- return this.props.ScreenToLocalTransform().translate(0, -offset / (this.props.NativeDimScaling?.() || 1));
+ return this._props.ScreenToLocalTransform().translate(0, -offset / (this._props.NativeDimScaling?.() || 1));
}
offset += this.lookupPixels(candidate) + resizerHeight;
}
@@ -188,7 +193,6 @@ export class CollectionMultirowView extends CollectionSubView() {
};
@undoBatch
- @action
onInternalDrop = (e: Event, de: DragManager.DropEvent) => {
let dropInd = -1;
if (de.complete.docDragData && this._mainCont) {
@@ -215,8 +219,8 @@ export class CollectionMultirowView extends CollectionSubView() {
if (this.childDocs.includes(d)) {
if (dropInd > this.childDocs.indexOf(d)) dropInd--;
}
- Doc.RemoveDocFromList(this.rootDoc, this.props.fieldKey, d);
- Doc.AddDocToList(this.rootDoc, this.props.fieldKey, d, DocListCast(this.rootDoc[this.props.fieldKey])[dropInd], undefined, dropInd === -1);
+ Doc.RemoveDocFromList(this.dataDoc, this._props.fieldKey, d);
+ Doc.AddDocToList(this.dataDoc, this._props.fieldKey, d, DocListCast(this.dataDoc[this._props.fieldKey])[dropInd], undefined, dropInd === -1);
}
})
);
@@ -229,51 +233,58 @@ export class CollectionMultirowView extends CollectionSubView() {
onChildClickHandler = () => ScriptCast(this.Document.onChildClick);
onChildDoubleClickHandler = () => ScriptCast(this.Document.onChildDoubleClick);
- isContentActive = () => this.props.isSelected() || this.props.isContentActive() || this.props.isAnyChildContentActive();
+ isContentActive = () => this._props.isSelected() || this._props.isContentActive() || this._props.isAnyChildContentActive();
isChildContentActive = () => {
- const childDocsActive = this.props.childDocumentsActive?.() ?? this.rootDoc.childDocumentsActive;
- return this.props.isContentActive?.() === false || childDocsActive === false
+ const childDocsActive = this._props.childDocumentsActive?.() ?? this.Document.childDocumentsActive;
+ return this._props.isContentActive?.() === false || childDocsActive === false
? false //
- : this.props.isDocumentActive?.() && childDocsActive
- ? true
- : undefined;
+ : this._props.isDocumentActive?.() && childDocsActive
+ ? true
+ : undefined;
};
- getDisplayDoc = (layout: Doc, dxf: () => Transform, width: () => number, height: () => number, shouldNotScale: () => boolean) => {
+ getDisplayDoc = (layout: Doc) => {
+ const height = () => this.lookupPixels(layout);
+ const width = () => this._props.PanelWidth() - 2 * NumCast(this.layoutDoc._xMargin) - (BoolCast(this.layoutDoc.showWidthLabels) ? 20 : 0);
+ const dxf = () =>
+ this.lookupIndividualTransform(layout)
+ .translate(-NumCast(this.layoutDoc._xMargin), -NumCast(this.layoutDoc._yMargin))
+ .scale(this._props.NativeDimScaling?.() || 1);
+ const shouldNotScale = () => this._props.fitContentsToBox?.() || BoolCast(layout.freeform_fitContentsToBox);
return (
<DocumentView
Document={layout}
- DataDoc={layout.resolvedDataDoc as Doc}
- styleProvider={this.props.styleProvider}
- docViewPath={this.props.docViewPath}
- LayoutTemplate={this.props.childLayoutTemplate}
- LayoutTemplateString={this.props.childLayoutString}
- renderDepth={this.props.renderDepth + 1}
+ TemplateDataDocument={layout.resolvedDataDoc as Doc}
+ styleProvider={this._props.styleProvider}
+ docViewPath={this._props.docViewPath}
+ LayoutTemplate={this._props.childLayoutTemplate}
+ LayoutTemplateString={this._props.childLayoutString}
+ renderDepth={this._props.renderDepth + 1}
PanelWidth={width}
PanelHeight={height}
- shouldNotScale={shouldNotScale}
rootSelected={this.rootSelected}
- dropAction={StrCast(this.rootDoc.childDragAction) as dropActionType}
+ dropAction={StrCast(this.Document.childDragAction) as dropActionType}
onClick={this.onChildClickHandler}
onDoubleClick={this.onChildDoubleClickHandler}
ScreenToLocalTransform={dxf}
isContentActive={this.isChildContentActive}
- isDocumentActive={this.props.childDocumentsActive?.() || this.Document._childDocumentsActive ? this.props.isDocumentActive : this.isContentActive}
- hideResizeHandles={this.props.childHideResizeHandles?.()}
- hideDecorationTitle={this.props.childHideDecorationTitle?.()}
- fitContentsToBox={this.props.fitContentsToBox}
- dragAction={this.props.childDragAction}
- focus={this.props.focus}
+ isDocumentActive={this._props.childDocumentsActive?.() || this.Document._childDocumentsActive ? this._props.isDocumentActive : this.isContentActive}
+ hideResizeHandles={layout.layout_fitWidth || this._props.childHideResizeHandles ? true : false}
+ hideDecorationTitle={this._props.childHideDecorationTitle}
+ fitContentsToBox={this._props.fitContentsToBox}
+ dragAction={this._props.childDragAction}
+ focus={this._props.focus}
childFilters={this.childDocFilters}
childFiltersByRanges={this.childDocRangeFilters}
searchFilterDocs={this.searchFilterDocs}
- dontRegisterView={this.props.dontRegisterView}
- addDocument={this.props.addDocument}
- moveDocument={this.props.moveDocument}
- removeDocument={this.props.removeDocument}
- whenChildContentsActiveChanged={this.props.whenChildContentsActiveChanged}
- addDocTab={this.props.addDocTab}
- pinToPres={this.props.pinToPres}
+ dontRegisterView={this._props.dontRegisterView}
+ addDocument={this._props.addDocument}
+ moveDocument={this._props.moveDocument}
+ removeDocument={this._props.removeDocument}
+ whenChildContentsActiveChanged={this._props.whenChildContentsActiveChanged}
+ addDocTab={this._props.addDocTab}
+ pinToPres={this._props.pinToPres}
bringToFront={returnFalse}
+ dontCenter={StrCast(this.layoutDoc.layout_dontCenter) as any} // 'y', 'x', 'xy'
/>
);
};
@@ -284,29 +295,18 @@ export class CollectionMultirowView extends CollectionSubView() {
@computed
private get contents(): JSX.Element[] | null {
const { childLayoutPairs } = this;
- const { Document, PanelWidth } = this.props;
const collector: JSX.Element[] = [];
for (let i = 0; i < childLayoutPairs.length; i++) {
const { layout } = childLayoutPairs[i];
- const aspect = Doc.NativeAspect(layout, undefined, true);
- const height = () => this.lookupPixels(layout);
- const width = () => PanelWidth() - 2 * NumCast(Document._xMargin) - (BoolCast(Document.showWidthLabels) ? 20 : 0);
- const docheight = () => Math.min(width() / aspect, height());
- const docwidth = () => (layout._layout_reflowHorizontal ? width() : Math.min(width(), docheight() * aspect));
- const dxf = () =>
- this.lookupIndividualTransform(layout)
- .translate(-NumCast(Document._xMargin) - (width() - docwidth()) / 2, -NumCast(Document._yMargin) - (height() - docheight()) / 2)
- .scale(this.props.NativeDimScaling?.() || 1);
- const shouldNotScale = () => this.props.fitContentsToBox?.() || BoolCast(layout.freeform_fitContentsToBox);
collector.push(
- <div className="document-wrapper" style={{ height: height() }} key={'wrapper' + i}>
- {this.getDisplayDoc(layout, dxf, docwidth, docheight, shouldNotScale)}
- <HeightLabel layout={layout} collectionDoc={Document} />
+ <div className="document-wrapper" style={{ flexDirection: 'row', height: this.lookupPixels(layout) }} key={'wrapper' + i}>
+ {this.getDisplayDoc(layout)}
+ <HeightLabel layout={layout} collectionDoc={this.Document} />
</div>,
<ResizeBar
height={resizerHeight}
- styleProvider={this.props.styleProvider}
- isContentActive={this.props.isContentActive}
+ styleProvider={this._props.styleProvider}
+ isContentActive={this._props.isContentActive}
key={'resizer' + i}
columnUnitLength={this.getRowUnitLength}
toTop={layout}
@@ -318,17 +318,17 @@ export class CollectionMultirowView extends CollectionSubView() {
return collector;
}
- render(): JSX.Element {
+ render() {
return (
<div
- className={'collectionMultirowView_contents'}
+ className="collectionMultirowView_contents"
style={{
- width: `calc(100% - ${2 * NumCast(this.props.Document._xMargin)}px)`,
- height: `calc(100% - ${2 * NumCast(this.props.Document._yMargin)}px)`,
- marginLeft: NumCast(this.props.Document._xMargin),
- marginRight: NumCast(this.props.Document._xMargin),
- marginTop: NumCast(this.props.Document._yMargin),
- marginBottom: NumCast(this.props.Document._yMargin),
+ width: `calc(100% - ${2 * NumCast(this.Document._xMargin)}px)`,
+ height: `calc(100% - ${2 * NumCast(this.Document._yMargin)}px)`,
+ marginLeft: NumCast(this.Document._xMargin),
+ marginRight: NumCast(this.Document._xMargin),
+ marginTop: NumCast(this.Document._yMargin),
+ marginBottom: NumCast(this.Document._yMargin),
}}
ref={this.createDashEventsTarget}>
{this.contents}