aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/presentationview
diff options
context:
space:
mode:
authoranika-ahluwalia <anika.ahluwalia@gmail.com>2020-05-22 11:27:38 -0500
committeranika-ahluwalia <anika.ahluwalia@gmail.com>2020-05-22 11:27:38 -0500
commit2fa84b20fa657835510cb9be876817845d3df61b (patch)
treed07ababb415470fd003c1ac5b40f9d83475682d3 /src/client/views/presentationview
parent755ea0668b559a2ae5f2c6dac86261db86e9ad2e (diff)
parentfdbff9dbb60b4af8f6feba67feda5376263dd7ca (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into script_documents
Diffstat (limited to 'src/client/views/presentationview')
-rw-r--r--src/client/views/presentationview/PresElementBox.tsx9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/client/views/presentationview/PresElementBox.tsx b/src/client/views/presentationview/PresElementBox.tsx
index a2a6882b9..526a3dbf4 100644
--- a/src/client/views/presentationview/PresElementBox.tsx
+++ b/src/client/views/presentationview/PresElementBox.tsx
@@ -100,13 +100,13 @@ export class PresElementBox extends ViewBoxBaseComponent<FieldViewProps, PresDoc
e.stopPropagation();
this.rootDoc.presProgressivize = !this.rootDoc.presProgressivize;
const rootTarget = Cast(this.rootDoc.presentationTargetDoc, Doc, null);
+ const docs = DocListCast(rootTarget[Doc.LayoutFieldKey(rootTarget)]);
if (this.rootDoc.presProgressivize && !rootTarget?.lastTimecode) {
- const docs = DocListCast(rootTarget[Doc.LayoutFieldKey(rootTarget)]);
rootTarget.currentTimecode = 0;
CollectionFreeFormDocumentView.setupKeyframes(docs, docs.length, this.presBox);
- docs.forEach((d, i) => numberRange(docs.length - i).forEach(f => Cast(d["opacity-indexed"], listSpec("number"), [])[f + i] = 1));
rootTarget.lastTimecode = docs.length - 1;
}
+ docs.forEach((d, i) => i && numberRange(i).forEach(f => Cast(d["opacity-indexed"], listSpec("number"), [])[f] = 0));
}
/**
@@ -216,7 +216,10 @@ export class PresElementBox extends ViewBoxBaseComponent<FieldViewProps, PresDoc
<strong className="presElementBox-name">
{`${this.indexInPres + 1}. ${this.targetDoc?.title}`}
</strong>
- <button className="presElementBox-closeIcon" onPointerDown={e => e.stopPropagation()} onClick={e => this.props.removeDocument?.(this.rootDoc)}>X</button>
+ <button className="presElementBox-closeIcon" onPointerDown={e => e.stopPropagation()} onClick={e => {
+ this.props.removeDocument?.(this.rootDoc);
+ e.stopPropagation();
+ }}>X</button>
<br />
</>}
<div className="presElementBox-buttons">