aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionMasonryViewFieldRow.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/collections/CollectionMasonryViewFieldRow.tsx')
-rw-r--r--src/client/views/collections/CollectionMasonryViewFieldRow.tsx14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/client/views/collections/CollectionMasonryViewFieldRow.tsx b/src/client/views/collections/CollectionMasonryViewFieldRow.tsx
index d6cb174cc..cc7a9f5ac 100644
--- a/src/client/views/collections/CollectionMasonryViewFieldRow.tsx
+++ b/src/client/views/collections/CollectionMasonryViewFieldRow.tsx
@@ -1,6 +1,4 @@
import React = require("react");
-import { library } from '@fortawesome/fontawesome-svg-core';
-import { faPalette } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { action, computed, observable, runInAction } from "mobx";
import { observer } from "mobx-react";
@@ -22,8 +20,6 @@ const higflyout = require("@hig/flyout");
export const { anchorPoints } = higflyout;
export const Flyout = higflyout.default;
-library.add(faPalette);
-
interface CMVFieldRowProps {
rows: () => number;
headings: () => object[];
@@ -244,13 +240,15 @@ export class CollectionMasonryViewFieldRow extends React.Component<CMVFieldRowPr
toggle: this.toggleVisibility,
color: this.color
};
+ const showChrome = (chromeStatus !== 'view-mode' && chromeStatus !== 'disabled');
+ const stackPad = showChrome ? `0px ${this.props.parent.xMargin}px` : `${this.props.parent.yMargin}px ${this.props.parent.xMargin}px 0px ${this.props.parent.xMargin}px `;
return this.collapsed ? (null) :
<div style={{ position: "relative" }}>
- {(chromeStatus !== 'view-mode' && chromeStatus !== 'disabled') ?
+ {showChrome ?
<div className="collectionStackingView-addDocumentButton"
style={{
- width: style.columnWidth / style.numGroupColumns,
- padding: NumCast(this.props.parent.layoutDoc._yPadding)
+ //width: style.columnWidth / style.numGroupColumns,
+ padding: `${NumCast(this.props.parent.layoutDoc._yPadding, this.props.parent.yMargin)}px 0px 0px 0px`
}}>
<EditableView {...newEditableViewProps} />
</div> : null
@@ -258,7 +256,7 @@ export class CollectionMasonryViewFieldRow extends React.Component<CMVFieldRowPr
<div className={`collectionStackingView-masonryGrid`}
ref={this._contRef}
style={{
- padding: `${this.props.parent.yMargin}px ${this.props.parent.xMargin}px`,
+ padding: stackPad,
width: this.props.parent.NodeWidth,
gridGap: this.props.parent.gridGap,
gridTemplateColumns: numberRange(rows).reduce((list: string, i: any) => list + ` ${this.props.parent.columnWidth}px`, ""),