aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/PresBox.tsx
diff options
context:
space:
mode:
authorgeireann <60007097+geireann@users.noreply.github.com>2020-07-24 14:04:25 +0800
committergeireann <60007097+geireann@users.noreply.github.com>2020-07-24 14:04:25 +0800
commit3b5f5875929c2b033dd536c7838606cb91c01a1a (patch)
tree9e24b1cef79d1e60aa7f39a430afbe6bc804d660 /src/client/views/nodes/PresBox.tsx
parent0bdbf8bfbd4c2c2e8e7c1f4e7d530c628ad5e398 (diff)
parentf68b3da6c4d01bf9627723d58a6ce006e360ea30 (diff)
Merge branch 'master' into presentation_updates
Diffstat (limited to 'src/client/views/nodes/PresBox.tsx')
-rw-r--r--src/client/views/nodes/PresBox.tsx14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/client/views/nodes/PresBox.tsx b/src/client/views/nodes/PresBox.tsx
index 7ac2dc317..e8e788bc5 100644
--- a/src/client/views/nodes/PresBox.tsx
+++ b/src/client/views/nodes/PresBox.tsx
@@ -51,7 +51,7 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps, PresBoxSchema>
// this script will be called by each presElement to get rendering-specific info that the PresBox knows about but which isn't written to the PresElement
// this is a design choice -- we could write this data to the presElements which would require a reaction to keep it up to date, and it would prevent
// the preselement docs from being part of multiple presentations since they would all have the same field, or we'd have to keep per-presentation data
- // stored on each pres element.
+ // stored on each pres element.
(this.presElement as Doc).lookupField = ScriptField.MakeFunction("lookupPresBoxField(container, field, data)",
{ field: "string", data: Doc.name, container: Doc.name });
}
@@ -443,6 +443,10 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps, PresBoxSchema>
active = (outsideReaction?: boolean) => ((Doc.GetSelectedTool() === InkTool.None && !this.layoutDoc.isBackground) &&
(this.layoutDoc.forceActive || this.props.isSelected(outsideReaction) || this._isChildActive || this.props.renderDepth === 0) ? true : false)
+ // render() {
+ // const presOrderedDocs = DocListCast(this.rootDoc.presOrderedDocs);
+ // if (presOrderedDocs.length != this.childDocs.length || presOrderedDocs.some((pd, i) => pd !== this.childDocs[i])) {
+ // this.rootDoc.presOrderedDocs = new List<Doc>(this.childDocs.slice());
// KEYS
@observable _selectedArray: Doc[] = [];
@@ -495,7 +499,7 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps, PresBoxSchema>
e.stopPropagation;
// switch(e.keyCode) {
// case 27: console.log("escape");
- // case 65 && (e.metaKey || e.altKey):
+ // case 65 && (e.metaKey || e.altKey):
// }
// Escape key
if (e.keyCode === 27) {
@@ -656,7 +660,7 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps, PresBoxSchema>
}}
fill="none"
// markerStart="url(#square)"
- // markerEnd="url(#arrow)"
+ // markerEnd="url(#arrow)"
marker-start="url(#markerSquare)"
marker-mid="url(#markerSquare)"
marker-end="url(#markerArrow)"
@@ -1413,7 +1417,7 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps, PresBoxSchema>
}
render() {
- this.childDocs.slice(); // needed to insure that the childDocs are loaded for looking up fields
+ this.childDocs.slice(); // needed to insure that the childDocs are loaded for looking up fields
const mode = StrCast(this.rootDoc._viewType) as CollectionViewType;
return <div onPointerOver={this.onPointerOver} onPointerLeave={this.onPointerLeave} className="presBox-cont" style={{ minWidth: this.layoutDoc.inOverlay ? 240 : undefined }} >
<div className="presBox-buttons" style={{ display: this.rootDoc._chromeStatus === "disabled" ? "none" : undefined }}>
@@ -1489,4 +1493,4 @@ Scripting.addGlobal(function lookupPresBoxField(container: Doc, field: string, d
// const presOrderedDocs = DocListCast(activeItem.presOrderedDocs);
// if (presOrderedDocs.length != this.childDocs.length || presOrderedDocs.some((pd, i) => pd !== this.childDocs[i])) {
// this.rootDoc.presOrderedDocs = new List<Doc>(this.childDocs.slice());
- // } \ No newline at end of file
+ // }