diff options
author | Bob Zeleznik <zzzman@gmail.com> | 2020-05-21 13:56:00 -0400 |
---|---|---|
committer | Bob Zeleznik <zzzman@gmail.com> | 2020-05-21 13:56:00 -0400 |
commit | c5a14d8e29e7c5cd4e18d7f4175e5d3938dacde7 (patch) | |
tree | 41dbe5171d8c6f8fb83780213cf05eb0f4e682e4 /src | |
parent | 8a2abbcc51e42dd48f0b510b9f5790cb44450e48 (diff) |
fixed pres box progressivize to force progressivization
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/presentationview/PresElementBox.tsx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/client/views/presentationview/PresElementBox.tsx b/src/client/views/presentationview/PresElementBox.tsx index a2a6882b9..f364b40fd 100644 --- a/src/client/views/presentationview/PresElementBox.tsx +++ b/src/client/views/presentationview/PresElementBox.tsx @@ -100,13 +100,14 @@ 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 +217,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"> |