From aa4f7b37483c516b92181d3374d3151972b98383 Mon Sep 17 00:00:00 2001 From: bobzel Date: Wed, 24 Apr 2024 14:56:48 -0400 Subject: fixed search on pdfs to display results when pDF is not selected. fixed presentation transitions to animate. changed so that annotaitons on pdfs would highlight when following a pres slide. fixed scrolling to annotations (and other viewSpecs) from presentations by using the slide target, not the slide as the focus document. cleaned up search and fixed to unhighlight searches on close. fixe pdf search unhighligting to work. --- src/fields/Doc.ts | 3 +++ src/fields/List.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'src/fields') diff --git a/src/fields/Doc.ts b/src/fields/Doc.ts index 5028e1f8f..7b5e21ab7 100644 --- a/src/fields/Doc.ts +++ b/src/fields/Doc.ts @@ -1235,6 +1235,8 @@ export namespace Doc { // if doc is a layout template then we don't want to highlight the proto since that will be the entire template, not just the specific layout field highlightedDocs.add(doc[DocData]); doc[DocData][Highlight] = true; + // want to highlight the targets of presentation docs explicitly since following a pres target does not highlight PDf which are not DocumentViews + if (doc.presentation_targetDoc) DocCast(doc.presentation_targetDoc)[Highlight] = true; } }); } @@ -1246,6 +1248,7 @@ export namespace Doc { highlightedDocs.delete(doc[DocData]); doc[Highlight] = doc[DocData][Highlight] = false; doc[Animation] = undefined; + if (doc.presentation_targetDoc) DocCast(doc.presentation_targetDoc)[Highlight] = false; }); }); } diff --git a/src/fields/List.ts b/src/fields/List.ts index 852b05bc6..38c47d546 100644 --- a/src/fields/List.ts +++ b/src/fields/List.ts @@ -308,7 +308,7 @@ class ListImpl extends ObjectField { // eslint-disable-next-line no-use-before-define private [SelfProxy]: List; // also used in utils.ts even though it won't be found using find all references - [ToScriptString]() { return `new List(${this[ToJavascriptString]})`; } // prettier-ignore + [ToScriptString]() { return `new List(${this[ToJavascriptString]()})`; } // prettier-ignore [ToJavascriptString]() { return `[${(this as any).map((field: any) => Field.toScriptString(field))}]`; } // prettier-ignore [ToString]() { return `[${(this as any).map((field: any) => Field.toString(field))}]`; } // prettier-ignore } -- cgit v1.2.3-70-g09d2