aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/trails/PresBox.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-11-29 11:55:44 -0500
committerbobzel <zzzman@gmail.com>2023-11-29 11:55:44 -0500
commit872dc82886f8111da1bdfd282ac2a78ec3bdc1f6 (patch)
tree5111fa27c38c2a971168b6dfd490a1a22b159948 /src/client/views/nodes/trails/PresBox.tsx
parente1c5b6ad318433d6e499f21065b35332f57b98ff (diff)
cleaned up presElementBox and did more this.rootDoc => this.Document/layoutDoc
Diffstat (limited to 'src/client/views/nodes/trails/PresBox.tsx')
-rw-r--r--src/client/views/nodes/trails/PresBox.tsx4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client/views/nodes/trails/PresBox.tsx b/src/client/views/nodes/trails/PresBox.tsx
index bb0ed0943..71c585c38 100644
--- a/src/client/views/nodes/trails/PresBox.tsx
+++ b/src/client/views/nodes/trails/PresBox.tsx
@@ -36,6 +36,7 @@ import { FieldView, FieldViewProps } from '../FieldView';
import { ScriptingBox } from '../ScriptingBox';
import './PresBox.scss';
import { PresEffect, PresEffectDirection, PresMovement, PresStatus } from './PresEnums';
+import _ = require('lodash');
const { Howl } = require('howler');
export interface pinDataTypes {
@@ -1075,6 +1076,7 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() {
});
return true;
};
+
childLayoutTemplate = () => Docs.Create.PresElementBoxDocument();
removeDocument = (doc: Doc) => Doc.RemoveDocFromList(this.Document, this.fieldKey, doc);
getTransform = () => this.props.ScreenToLocalTransform().translate(-5, -65); // listBox padding-left and pres-box-cont minHeight
@@ -2549,6 +2551,8 @@ export class PresBox extends ViewBoxBaseComponent<FieldViewProps>() {
}
};
+ SlideIndex = (slideDoc: Doc) => DocListCast(this.dataDoc[this.presFieldKey]).indexOf(slideDoc);
+
RemFromMap = (treeViewDoc: Doc, index: number[]) => {
if (!treeViewDoc.presentation_targetDoc) return this.childDocs; // if treeViewDoc is not a pres elements, then it's a sub-bullet of a progressivized slide which isn't added to the linearized list of pres elements since it's not really a pres element.
if (!this._unmounting && this.isTree) {