aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/PropertiesView.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/views/PropertiesView.tsx')
-rw-r--r--src/client/views/PropertiesView.tsx279
1 files changed, 251 insertions, 28 deletions
diff --git a/src/client/views/PropertiesView.tsx b/src/client/views/PropertiesView.tsx
index ab9022a84..f38341603 100644
--- a/src/client/views/PropertiesView.tsx
+++ b/src/client/views/PropertiesView.tsx
@@ -1,18 +1,19 @@
import React = require("react");
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
+import { faAnchor, faArrowRight } from '@fortawesome/free-solid-svg-icons'
import { Checkbox, Tooltip } from "@material-ui/core";
import { intersection } from "lodash";
import { action, autorun, computed, Lambda, observable } from "mobx";
import { observer } from "mobx-react";
import { ColorState, SketchPicker } from "react-color";
-import { AclAdmin, AclAugment, AclEdit, AclPrivate, AclReadonly, AclSelfEdit, AclSym, AclUnset, DataSym, Doc, Field, HeightSym, Opt, WidthSym } from "../../fields/Doc";
+import { AclAdmin, AclAugment, AclEdit, AclPrivate, AclReadonly, AclSelfEdit, AclSym, AclUnset, DataSym, Doc, Field, HeightSym, NumListCast, Opt, StrListCast, WidthSym } from "../../fields/Doc";
import { Id } from "../../fields/FieldSymbols";
import { InkField } from "../../fields/InkField";
import { List } from "../../fields/List";
import { ComputedField } from "../../fields/ScriptField";
import { BoolCast, Cast, NumCast, StrCast } from "../../fields/Types";
import { denormalizeEmail, GetEffectiveAcl, SharingPermissions } from "../../fields/util";
-import { emptyFunction, returnEmptyDoclist, returnEmptyFilter, returnFalse, returnTrue } from "../../Utils";
+import { emptyFunction, returnEmptyDoclist, returnEmptyFilter, returnFalse, returnTrue, setupMoveUpEvents } from "../../Utils";
import { DocumentType } from "../documents/DocumentTypes";
import { CurrentUserUtils } from "../util/CurrentUserUtils";
import { DocumentManager } from "../util/DocumentManager";
@@ -31,6 +32,7 @@ import { PropertiesButtons } from "./PropertiesButtons";
import { PropertiesDocContextSelector } from "./PropertiesDocContextSelector";
import "./PropertiesView.scss";
import { DefaultStyleProvider } from "./StyleProvider";
+import { LinkManager } from "../util/LinkManager";
const higflyout = require("@hig/flyout");
export const { anchorPoints } = higflyout;
export const Flyout = higflyout.default;
@@ -57,6 +59,9 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
@computed get isPres(): boolean {
return this.selectedDoc?.type === DocumentType.PRES;
}
+ @computed get isLink(): boolean {
+ return this.selectedDoc?.type === DocumentType.LINK;
+ }
@computed get dataDoc() { return this.selectedDoc?.[DataSym]; }
@observable layoutFields: boolean = false;
@@ -146,8 +151,8 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
if (key[0] === "#") {
rows.push(<div style={{ display: "flex", overflowY: "visible", marginBottom: "2px" }} key={key}>
<span style={{ fontWeight: "bold", whiteSpace: "nowrap" }}>{key}</span>
- &nbsp;
- </div>);
+ &nbsp;
+ </div>);
} else {
const contentElement = <EditableView key="editableView"
contents={contents !== undefined ? Field.toString(contents as Field) : "null"}
@@ -214,8 +219,8 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
rows.push(<div style={{ display: "flex", overflowY: "visible", marginBottom: "-1px" }} key={key}>
<span style={{ fontWeight: "bold", whiteSpace: "nowrap" }}>{key + ":"}</span>
- &nbsp;
- {contentElement}
+ &nbsp;
+ {contentElement}
</div>);
}
}
@@ -295,7 +300,7 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
freezeDimensions={true}
dontCenter={"y"}
isDocumentActive={returnFalse}
- isContentActive={returnFalse}
+ isContentActive={emptyFunction}
NativeWidth={layoutDoc.type === DocumentType.RTF ? this.rtfWidth : undefined}
NativeHeight={layoutDoc.type === DocumentType.RTF ? this.rtfHeight : undefined}
PanelWidth={panelWidth}
@@ -535,16 +540,17 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
@computed
get controlPointsButton() {
- const formatInstance = InkStrokeProperties.Instance;
- return !formatInstance ? (null) : <div className="inking-button">
+ return <div className="inking-button">
<Tooltip title={<div className="dash-tooltip">{"Edit points"}</div>}>
- <div className="inking-button-points" onPointerDown={action(() => formatInstance._controlButton = !formatInstance._controlButton)} style={{ backgroundColor: formatInstance._controlButton ? "black" : "" }}>
+ <div className="inking-button-points"
+ style={{ backgroundColor: InkStrokeProperties.Instance._controlButton ? "black" : "" }}
+ onPointerDown={action(() => InkStrokeProperties.Instance._controlButton = !InkStrokeProperties.Instance._controlButton)} >
<FontAwesomeIcon icon="bezier-curve" color="white" size="lg" />
</div>
</Tooltip>
- <Tooltip title={<div className="dash-tooltip">{formatInstance._lock ? "Unlock ratio" : "Lock ratio"}</div>}>
- <div className="inking-button-lock" onPointerDown={action(() => formatInstance._lock = !formatInstance._lock)} >
- <FontAwesomeIcon icon={formatInstance._lock ? "lock" : "unlock"} color="white" size="lg" />
+ <Tooltip title={<div className="dash-tooltip">{InkStrokeProperties.Instance._lock ? "Unlock ratio" : "Lock ratio"}</div>}>
+ <div className="inking-button-lock" onPointerDown={action(() => InkStrokeProperties.Instance._lock = !InkStrokeProperties.Instance._lock)} >
+ <FontAwesomeIcon icon={InkStrokeProperties.Instance._lock ? "lock" : "unlock"} color="white" size="lg" />
</div>
</Tooltip>
<Tooltip title={<div className="dash-tooltip">{"Rotate 90˚"}</div>}>
@@ -603,7 +609,7 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
const oldX = NumCast(this.selectedDoc?.x);
const oldY = NumCast(this.selectedDoc?.y);
this.selectedDoc && (this.selectedDoc._width = oldWidth + (dirs === "up" ? 10 : - 10));
- InkStrokeProperties.Instance?._lock && this.selectedDoc && (this.selectedDoc._height = (NumCast(this.selectedDoc?._width) / oldWidth * NumCast(this.selectedDoc?._height)));
+ InkStrokeProperties.Instance._lock && this.selectedDoc && (this.selectedDoc._height = (NumCast(this.selectedDoc?._width) / oldWidth * NumCast(this.selectedDoc?._height)));
const doc = this.selectedDoc;
if (doc?.type === DocumentType.INK && doc.x && doc.y && doc._height && doc._width) {
const ink = Cast(doc.data, InkField)?.inkData;
@@ -625,7 +631,7 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
const oX = NumCast(this.selectedDoc?.x);
const oY = NumCast(this.selectedDoc?.y);
this.selectedDoc && (this.selectedDoc._height = oHeight + (dirs === "up" ? 10 : - 10));
- InkStrokeProperties.Instance?._lock && this.selectedDoc && (this.selectedDoc._width = (NumCast(this.selectedDoc?._height) / oHeight * NumCast(this.selectedDoc?._width)));
+ InkStrokeProperties.Instance._lock && this.selectedDoc && (this.selectedDoc._width = (NumCast(this.selectedDoc?._height) / oHeight * NumCast(this.selectedDoc?._width)));
const docu = this.selectedDoc;
if (docu?.type === DocumentType.INK && docu.x && docu.y && docu._height && docu._width) {
const ink = Cast(docu.data, InkField)?.inkData;
@@ -663,12 +669,12 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
set shapeWid(value) {
const oldWidth = NumCast(this.selectedDoc?._width);
this.selectedDoc && (this.selectedDoc._width = Number(value));
- InkStrokeProperties.Instance?._lock && this.selectedDoc && (this.selectedDoc._height = (NumCast(this.selectedDoc?._width) * NumCast(this.selectedDoc?._height)) / oldWidth);
+ InkStrokeProperties.Instance._lock && this.selectedDoc && (this.selectedDoc._height = (NumCast(this.selectedDoc?._width) * NumCast(this.selectedDoc?._height)) / oldWidth);
}
set shapeHgt(value) {
const oldHeight = NumCast(this.selectedDoc?._height);
this.selectedDoc && (this.selectedDoc._height = Number(value));
- InkStrokeProperties.Instance?._lock && this.selectedDoc && (this.selectedDoc._width = (NumCast(this.selectedDoc?._height) * NumCast(this.selectedDoc?._width)) / oldHeight);
+ InkStrokeProperties.Instance._lock && this.selectedDoc && (this.selectedDoc._width = (NumCast(this.selectedDoc?._height) * NumCast(this.selectedDoc?._width)) / oldHeight);
}
@computed get hgtInput() { return this.inputBoxDuo("hgt", this.shapeHgt, (val: string) => { if (!isNaN(Number(val))) { this.shapeHgt = val; } return true; }, "H:", "wid", this.shapeWid, (val: string) => { if (!isNaN(Number(val))) { this.shapeWid = val; } return true; }, "W:"); }
@@ -755,6 +761,7 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
@computed get dashdStk() { return this.selectedDoc?.strokeDash || ""; }
@computed get unStrokd() { return this.selectedDoc?.color ? true : false; }
@computed get widthStk() { return this.getField("strokeWidth") || "1"; }
+ @computed get markScal() { return Number(this.getField("strokeMakerScale") || "1"); }
@computed get markHead() { return this.getField("strokeStartMarker") || ""; }
@computed get markTail() { return this.getField("strokeEndMarker") || ""; }
set solidStk(value) { this.dashdStk = ""; this.unStrokd = !value; }
@@ -762,6 +769,7 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
value && (this._lastDash = value) && (this.unStrokd = false);
this.selectedDoc && (this.selectedDoc.strokeDash = value ? this._lastDash : undefined);
}
+ set markScal(value) { this.selectedDoc && (this.selectedDoc.strokeMarkerScale = Number(value)); }
set widthStk(value) { this.selectedDoc && (this.selectedDoc.strokeWidth = Number(value)); }
set unStrokd(value) { this.colorStk = value ? "" : this._lastLine; }
set markHead(value) { this.selectedDoc && (this.selectedDoc.strokeStartMarker = value); }
@@ -769,6 +777,7 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
@computed get stkInput() { return this.regInput("stk", this.widthStk, (val: string) => this.widthStk = val); }
+ @computed get markScaleInput() { return this.regInput("scale", this.markScal.toString(), (val: string) => this.markScal = Number(val)); }
regInput = (key: string, value: any, setter: (val: string) => {}) => {
@@ -806,6 +815,18 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
<div className="arrows">
<div className="arrows-head">
+ <div className="width-top">
+ <div className="width-title">Arrow Scale:</div>
+ {/* <div className="width-input">{this.markScalInput}</div> */}
+ </div>
+ <input className="width-range" type="range"
+ defaultValue={this.markScal} min={0} max={10}
+ onChange={(action(e => this.markScal = +e.target.value))}
+ onMouseDown={(e) => { this._widthUndo = UndoManager.StartBatch("scale undo"); }}
+ onMouseUp={(e) => { this._widthUndo?.end(); this._widthUndo = undefined; }}
+ />
+ </div>
+ <div className="arrows-head">
<div className="arrows-head-title" >Arrow Head: </div>
<input key="markHead" className="arrows-head-input" type="checkbox"
checked={this.markHead !== ""}
@@ -855,7 +876,7 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
onPointerDown={action(() => this.openOptions = !this.openOptions)}
style={{ backgroundColor: this.openOptions ? "black" : "" }}>
Options
- <div className="propertiesView-settings-title-icon">
+ <div className="propertiesView-settings-title-icon">
<FontAwesomeIcon icon={this.openOptions ? "caret-down" : "caret-right"} size="lg" color="white" />
</div>
</div>
@@ -872,7 +893,7 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
onPointerDown={action(() => this.openSharing = !this.openSharing)}
style={{ backgroundColor: this.openSharing ? "black" : "" }}>
Sharing {"&"} Permissions
- <div className="propertiesView-sharing-title-icon">
+ <div className="propertiesView-sharing-title-icon">
<FontAwesomeIcon icon={this.openSharing ? "caret-down" : "caret-right"} size="lg" color="white" />
</div>
</div>
@@ -948,7 +969,7 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
onPointerDown={action(() => this.openFilters = !this.openFilters)}
style={{ backgroundColor: this.openFilters ? "black" : "" }}>
Filters
- <div className="propertiesView-filters-title-icon">
+ <div className="propertiesView-filters-title-icon">
<FontAwesomeIcon icon={this.openFilters ? "caret-down" : "caret-right"} size="lg" color="white" />
</div>
</div>
@@ -997,7 +1018,7 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
onPointerDown={action(() => this.openAppearance = !this.openAppearance)}
style={{ backgroundColor: this.openAppearance ? "black" : "" }}>
Appearance
- <div className="propertiesView-appearance-title-icon">
+ <div className="propertiesView-appearance-title-icon">
<FontAwesomeIcon icon={this.openAppearance ? "caret-down" : "caret-right"} size="lg" color="white" />
</div>
</div>
@@ -1012,7 +1033,7 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
onPointerDown={action(() => this.openTransform = !this.openTransform)}
style={{ backgroundColor: this.openTransform ? "black" : "" }}>
Transform
- <div className="propertiesView-transform-title-icon">
+ <div className="propertiesView-transform-title-icon">
<FontAwesomeIcon icon={this.openTransform ? "caret-down" : "caret-right"} size="lg" color="white" />
</div>
</div>
@@ -1029,7 +1050,7 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
onPointerDown={action(() => this.openFields = !this.openFields)}
style={{ backgroundColor: this.openFields ? "black" : "" }}>
Fields {"&"} Tags
- <div className="propertiesView-fields-title-icon">
+ <div className="propertiesView-fields-title-icon">
<FontAwesomeIcon icon={this.openFields ? "caret-down" : "caret-right"} size="lg" color="white" />
</div>
</div>
@@ -1050,7 +1071,7 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
onPointerDown={action(() => this.openContexts = !this.openContexts)}
style={{ backgroundColor: this.openContexts ? "black" : "" }}>
Contexts
- <div className="propertiesView-contexts-title-icon">
+ <div className="propertiesView-contexts-title-icon">
<FontAwesomeIcon icon={this.openContexts ? "caret-down" : "caret-right"} size="lg" color="white" />
</div>
</div>
@@ -1064,7 +1085,7 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
onPointerDown={action(() => this.openLayout = !this.openLayout)}
style={{ backgroundColor: this.openLayout ? "black" : "" }}>
Layout
- <div className="propertiesView-layout-title-icon">
+ <div className="propertiesView-layout-title-icon">
<FontAwesomeIcon icon={this.openLayout ? "caret-down" : "caret-right"} size="lg" color="white" />
</div>
</div>
@@ -1072,7 +1093,147 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
</div>;
}
+ @observable description = Field.toString(LinkManager.currentLink?.description as any as Field);
+ @observable relationship = StrCast(LinkManager.currentLink?.linkRelationship);
+ @observable private relationshipButtonColor: string = "";
+
+ // @action
+ // handleDescriptionChange = (e: React.ChangeEvent<HTMLInputElement>) => { this.description = e.target.value; }
+ // handleRelationshipChange = (e: React.ChangeEvent<HTMLInputElement>) => { this.relationship = e.target.value; }
+ @undoBatch
+ handleDescriptionChange = action((value: string) => {
+ if (LinkManager.currentLink) {
+ this.selectedDoc.description = value;
+ this.description = value;
+ return true;
+ }
+ });
+
+ @undoBatch
+ handleLinkRelationshipChange = action((value: string) => {
+ if (LinkManager.currentLink) {
+ this.selectedDoc.linkRelationship = value;
+ this.relationship = value;
+ return true;
+ }
+ });
+
+ @undoBatch
+ setDescripValue = action((value: string) => {
+ if (LinkManager.currentLink) {
+ Doc.GetProto(LinkManager.currentLink).description = value;
+ return true;
+ }
+ });
+
+ @undoBatch
+ setLinkRelationshipValue = action((value: string) => {
+ if (LinkManager.currentLink) {
+ const prevRelationship = LinkManager.currentLink.linkRelationship as string;
+ LinkManager.currentLink.linkRelationship = value;
+ Doc.GetProto(LinkManager.currentLink).linkRelationship = value;
+ const linkRelationshipList = StrListCast(Doc.UserDoc().linkRelationshipList);
+ const linkRelationshipSizes = NumListCast(Doc.UserDoc().linkRelationshipSizes);
+ const linkColorList = StrListCast(Doc.UserDoc().linkColorList);
+
+ // if the relationship does not exist in the list, add it and a corresponding unique randomly generated color
+ if (!linkRelationshipList?.includes(value)) {
+ linkRelationshipList.push(value);
+ linkRelationshipSizes.push(1);
+ const randColor = "rgb(" + Math.floor(Math.random() * 255) + "," + Math.floor(Math.random() * 255) + "," + Math.floor(Math.random() * 255) + ")";
+ linkColorList.push(randColor);
+ // if the relationship is already in the list AND the new rel is different from the prev rel, update the rel sizes
+ } else if (linkRelationshipList && value !== prevRelationship) {
+ const index = linkRelationshipList.indexOf(value);
+ //increment size of new relationship size
+ if (index !== -1 && index < linkRelationshipSizes.length) {
+ const pvalue = linkRelationshipSizes[index];
+ linkRelationshipSizes[index] = (pvalue === undefined || !Number.isFinite(pvalue) ? 1 : pvalue + 1);
+ }
+ //decrement the size of the previous relationship if it already exists (i.e. not default 'link' relationship upon link creation)
+ if (linkRelationshipList.includes(prevRelationship)) {
+ const pindex = linkRelationshipList.indexOf(prevRelationship);
+ if (pindex !== -1 && pindex < linkRelationshipSizes.length) {
+ const pvalue = linkRelationshipSizes[pindex];
+ linkRelationshipSizes[pindex] = Math.max(0, (pvalue === undefined || !Number.isFinite(pvalue) ? 1 : pvalue - 1));
+ }
+ }
+
+ }
+ this.relationshipButtonColor = "rgb(62, 133, 55)";
+ setTimeout(action(() => this.relationshipButtonColor = ""), 750);
+ return true;
+ }
+ });
+
+ @undoBatch
+ changeFollowBehavior = action((follow: string) => {
+ if (LinkManager.currentLink) {
+ this.selectedDoc.followLinkLocation = follow;
+ return true;
+ }
+ });
+
+ onSelectOutDesc = () => {
+ this.setDescripValue(this.description);
+ document.getElementById('link_description_input')?.blur();
+ }
+
+ onDescriptionKey = (e: React.KeyboardEvent<HTMLInputElement>) => {
+ if (e.key === "Enter") {
+ this.setDescripValue(this.description);
+ document.getElementById('link_description_input')?.blur();
+ }
+ }
+
+ onSelectOutRelationship = () => {
+ this.setLinkRelationshipValue(this.relationship);
+ document.getElementById('link_relationship_input')?.blur();
+ }
+
+ onRelationshipKey = (e: React.KeyboardEvent<HTMLInputElement>) => {
+ if (e.key === "Enter") {
+ this.setLinkRelationshipValue(this.relationship);
+ document.getElementById('link_relationship_input')?.blur();
+ }
+ }
+
+ toggleAnchor = (e: React.PointerEvent) => {
+ setupMoveUpEvents(this, e, returnFalse, emptyFunction, undoBatch(action(() => this.selectedDoc.linkAutoMove = !this.selectedDoc.linkAutoMove)));
+ }
+
+ toggleArrow = (e: React.PointerEvent) => {
+ setupMoveUpEvents(this, e, returnFalse, emptyFunction, undoBatch(action(() => this.selectedDoc.displayArrow = !this.selectedDoc.displayArrow)));
+ }
+
+ @computed
+ get editRelationship() {
+ return <input
+ autoComplete={"off"}
+ id="link_relationship_input"
+ value={StrCast(this.selectedDoc.linkRelationship)}
+ onKeyDown={this.onRelationshipKey}
+ onBlur={this.onSelectOutRelationship}
+ onChange={e => this.handleLinkRelationshipChange(e.currentTarget.value)}
+ className="text"
+ type="text"
+ />
+ }
+
+ @computed
+ get editDescription() {
+ return <input
+ autoComplete={"off"}
+ id="link_description_input"
+ value={StrCast(this.selectedDoc.description)}
+ onKeyDown={this.onDescriptionKey}
+ onBlur={this.onSelectOutDesc}
+ onChange={e => this.handleDescriptionChange(e.currentTarget.value)}
+ className="text"
+ type="text"
+ />
+ }
/**
* Handles adding and removing members from the sharing panel
@@ -1095,6 +1256,67 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
</div>;
} else {
+ if (this.selectedDoc && this.isLink) {
+ return <div className="propertiesView">
+ <div className="propertiesView-title">
+ Linking
+ </div>
+ <div className="propertiesView-section">
+ <p className="propertiesView-label">Information</p>
+ <div className="propertiesView-input first" id="propertiesView-category">
+ <p>Link Relationship</p>
+ {this.editRelationship}
+ </div>
+ <div className="propertiesView-input" id="propertiesView-description">
+ <p>Description</p>
+ {this.editDescription}
+ </div>
+ </div>
+ <div className="propertiesView-section">
+ <p className="propertiesView-label">Behavior</p>
+ <div className="propertiesView-input inline first" id="propertiesView-follow">
+ <p>Follow</p>
+ <select
+ name="selectList"
+ id="selectList"
+ onChange={e => this.changeFollowBehavior(e.currentTarget.value)}
+ value={StrCast(this.selectedDoc.followLinkLocation, "default")}>
+ <option value="default">Default</option>
+ <option value="add:left">Open in new left pane</option>
+ <option value="add:right">Open in new right pane</option>
+ <option value="replace:left">Replace left tab</option>
+ <option value="replace:right">Replace right tab</option>
+ <option value="fullScreen">Open full screen</option>
+ <option value="add">Open in new tab</option>
+ <option value="replace">Replace current tab</option>
+ {this.selectedDoc.linksToAnnotation
+ ? <option value="openExternal">Open in external page</option>
+ : null}
+ </select>
+ </div>
+ <div className="propertiesView-input inline" id="propertiesView-anchor">
+ <p>Auto-move anchor</p>
+ <button
+ style={{ background: this.selectedDoc.hidden ? "gray" : !this.selectedDoc.linkAutoMove ? "" : "#4476f7", borderRadius: 3 }}
+ onPointerDown={this.toggleAnchor} onClick={e => e.stopPropagation()}
+ className="propertiesButton"
+ >
+ <FontAwesomeIcon className="fa-icon" icon={faAnchor} size="lg" />
+ </button>
+ </div>
+ <div className="propertiesView-input inline" id="propertiesView-displayArrow">
+ <p>Display arrow</p>
+ <button
+ style={{ background: this.selectedDoc.hidden ? "gray" : !this.selectedDoc.displayArrow ? "" : "#4476f7", borderRadius: 3 }}
+ onPointerDown={this.toggleArrow} onClick={e => e.stopPropagation()}
+ className="propertiesButton"
+ >
+ <FontAwesomeIcon className="fa-icon" icon={faArrowRight} size="lg" />
+ </button>
+ </div>
+ </div>
+ </div >;
+ }
if (this.selectedDoc && !this.isPres) {
return <div className="propertiesView" style={{
width: this.props.width,
@@ -1107,14 +1329,15 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
<div className="propertiesView-name">
{this.editableTitle}
</div>
+
+ {this.inkSubMenu}
+
{this.optionsSubMenu}
{this.sharingSubMenu}
{isNovice ? null : this.filtersSubMenu}
- {this.inkSubMenu}
-
{isNovice ? null : this.fieldsSubMenu}
{isNovice ? null : this.contextsSubMenu}
@@ -1148,7 +1371,7 @@ export class PropertiesView extends React.Component<PropertiesViewProps> {
onPointerDown={action(() => { this.openPresTransitions = !this.openPresTransitions; })}
style={{ backgroundColor: this.openPresTransitions ? "black" : "" }}>
&nbsp; <FontAwesomeIcon style={{ alignSelf: "center" }} icon={"rocket"} /> &nbsp; Transitions
- <div className="propertiesView-presTrails-title-icon">
+ <div className="propertiesView-presTrails-title-icon">
<FontAwesomeIcon icon={this.openPresTransitions ? "caret-down" : "caret-right"} size="lg" color="white" />
</div>
</div>