aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorljungster <parkerljung@gmail.com>2022-02-15 16:35:47 -0500
committerljungster <parkerljung@gmail.com>2022-02-15 16:35:47 -0500
commitabab63f89344e5bbbf0731e81e3ab7ddb0942664 (patch)
tree68923adf7d0f07d133d6d629e696ee533da9a3f4 /src
parent66fb0e4bbf88a5e9bcb5869dd7c8b8a7714de024 (diff)
added commits
Diffstat (limited to 'src')
-rw-r--r--src/client/views/collections/CollectionStackingView.scss1
-rw-r--r--src/client/views/collections/CollectionStackingViewFieldColumn.tsx14
-rw-r--r--src/client/views/nodes/trails/PresElementBox.tsx2
3 files changed, 17 insertions, 0 deletions
diff --git a/src/client/views/collections/CollectionStackingView.scss b/src/client/views/collections/CollectionStackingView.scss
index 2f002736d..3c3d040d2 100644
--- a/src/client/views/collections/CollectionStackingView.scss
+++ b/src/client/views/collections/CollectionStackingView.scss
@@ -386,6 +386,7 @@
.collectionStackingView-addDocumentButton {
font-size: 75%;
letter-spacing: 2px;
+ cursor: pointer;
.editableView-input {
outline-color: black;
diff --git a/src/client/views/collections/CollectionStackingViewFieldColumn.tsx b/src/client/views/collections/CollectionStackingViewFieldColumn.tsx
index 58289a161..32424bdc8 100644
--- a/src/client/views/collections/CollectionStackingViewFieldColumn.tsx
+++ b/src/client/views/collections/CollectionStackingViewFieldColumn.tsx
@@ -144,6 +144,7 @@ export class CollectionStackingViewFieldColumn extends React.Component<CSVFieldC
headerDown = (e: React.PointerEvent<HTMLDivElement>) => setupMoveUpEvents(this, e, this.startDrag, emptyFunction, emptyFunction);
+ //TODO: I think this is where I'm supposed to edit stuff
startDrag = (e: PointerEvent, down: number[], delta: number[]) => {
const alias = Doc.MakeAlias(this.props.Document);
alias._width = this.props.columnWidth / (this.props.columnHeaders?.length || 1);
@@ -308,6 +309,11 @@ export class CollectionStackingViewFieldColumn extends React.Component<CSVFieldC
{this.props.renderChildren(this.props.docList)}
</div>
{!this.props.chromeHidden && type !== DocumentType.PRES ?
+ // TODO: this is the "new" button: see what you can work with here
+ // change cursor to pointer for this, and update dragging cursor
+ //TODO: there is a bug that occurs when adding a freeform document and trying to move it around
+ //TODO: would be great if there was additional space beyond the frame, so that you can actually see your
+ // bottom note
<div key={`${heading}-add-document`} className="collectionStackingView-addDocumentButton"
style={{ width: this.props.columnWidth / this.props.numGroupColumns, marginBottom: 10 }}>
<EditableView
@@ -317,6 +323,14 @@ export class CollectionStackingViewFieldColumn extends React.Component<CSVFieldC
contents={"+ NEW"}
toggle={this.toggleVisibility}
menuCallback={this.menuCallback} />
+ <EditableView
+ GetValue={returnEmptyString}
+ SetValue={this.addNewTextDoc}
+ textCallback={this.textCallback}
+ contents={"+ OLD"}
+ toggle={this.toggleVisibility}
+ menuCallback={this.menuCallback}
+ showMenuOnLoad={true} />
</div> : null}
</div>
}
diff --git a/src/client/views/nodes/trails/PresElementBox.tsx b/src/client/views/nodes/trails/PresElementBox.tsx
index 238d025dc..b30e8cc13 100644
--- a/src/client/views/nodes/trails/PresElementBox.tsx
+++ b/src/client/views/nodes/trails/PresElementBox.tsx
@@ -169,6 +169,7 @@ export class PresElementBox extends ViewBoxBaseComponent<FieldViewProps, PresDoc
/**
* Function to drag and drop the pres element to a diferent location
*/
+ //TODO: this is what you need to look into
startDrag = (e: PointerEvent) => {
const miniView: boolean = this.toolbarWidth <= 100;
const activeItem = this.rootDoc;
@@ -291,6 +292,7 @@ export class PresElementBox extends ViewBoxBaseComponent<FieldViewProps, PresDoc
return width;
}
+ // TODO: this is what you were looking for
@computed get mainItem() {
const isSelected: boolean = PresBox.Instance._selectedArray.has(this.rootDoc);
const toolbarWidth: number = this.toolbarWidth;