aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/PropertiesButtons.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2021-03-17 12:25:01 -0400
committerbobzel <zzzman@gmail.com>2021-03-17 12:25:01 -0400
commit664a8a3968ce1d3a4fe549613aae4e509c2409ec (patch)
tree11b76b68520f8b8b8d2deaae923814e8fda5b3af /src/client/views/PropertiesButtons.tsx
parentec0510a3d80f065ab8aa1e5280e50d689628f008 (diff)
added autoHeight proeprtyButton. cleaned up stackingViewFieldColumn a bit
Diffstat (limited to 'src/client/views/PropertiesButtons.tsx')
-rw-r--r--src/client/views/PropertiesButtons.tsx5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/client/views/PropertiesButtons.tsx b/src/client/views/PropertiesButtons.tsx
index fbcd55c47..d303495a4 100644
--- a/src/client/views/PropertiesButtons.tsx
+++ b/src/client/views/PropertiesButtons.tsx
@@ -79,6 +79,9 @@ export class PropertiesButtons extends React.Component<{}, {}> {
@computed get titleButton() {
return this.propertyToggleBtn("Title", "_showTitle", on => "Switch between title styles", on => "text-width", (dv, doc) => (dv?.rootDoc || doc)._showTitle = !(dv?.rootDoc || doc)._showTitle ? "title" : (dv?.rootDoc || doc)._showTitle === "title" ? "title:hover" : undefined);
}
+ @computed get autoHeightButton() {
+ return this.propertyToggleBtn("Auto\xA0Size", "_autoHeight", on => `Automatical vertical sizing to show all content`, on => "arrows-alt-v");
+ }
@computed
get onClickButton() {
@@ -142,6 +145,7 @@ export class PropertiesButtons extends React.Component<{}, {}> {
const isText = layoutField instanceof RichTextField;
const isInk = layoutField instanceof InkField;
const isCollection = this.selectedDoc?.type === DocumentType.COL;
+ const isStacking = this.selectedDoc?._viewType === CollectionViewType.Stacking;
const isFreeForm = this.selectedDoc?._viewType === CollectionViewType.Freeform;
const toggle = (ele: JSX.Element | null, style?: React.CSSProperties) => <div className="propertiesButtons-button" style={style}> {ele} </div>;
@@ -152,6 +156,7 @@ export class PropertiesButtons extends React.Component<{}, {}> {
{toggle(this.chromeButton, { display: isCollection ? "" : "none" })}
{toggle(this.lockButton)}
{toggle(this.dictationButton)}
+ {toggle(this.autoHeightButton, { display: !isText && !isStacking ? "none" : "" })}
{toggle(this.onClickButton)}
{toggle(this.clustersButton, { display: !isFreeForm ? "none" : "" })}
{toggle(this.panButton, { display: !isFreeForm ? "none" : "" })}