diff options
| author | bobzel <zzzman@gmail.com> | 2025-02-03 12:44:38 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2025-02-03 12:44:38 -0500 |
| commit | f66eaad00dbfe27e8dbe28019d1148a70f6ba0d9 (patch) | |
| tree | cc334e81f944d2436cae259921bc2b0b3405e4b4 /src/client/views/nodes/FocusViewOptions.ts | |
| parent | 075247ed9c90de6e6c0512b9de70669385b434b3 (diff) | |
fixed defaults for roll animations effect. fixed hideBefore pres effect to not show Doc before effect starts
Diffstat (limited to 'src/client/views/nodes/FocusViewOptions.ts')
| -rw-r--r-- | src/client/views/nodes/FocusViewOptions.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/client/views/nodes/FocusViewOptions.ts b/src/client/views/nodes/FocusViewOptions.ts index bb0d2b03c..1c462e98f 100644 --- a/src/client/views/nodes/FocusViewOptions.ts +++ b/src/client/views/nodes/FocusViewOptions.ts @@ -22,3 +22,14 @@ export interface FocusViewOptions { pointFocus?: { X: number; Y: number }; // clientX and clientY coordinates to focus on instead of a document target (used by explore mode) contextPath?: Doc[]; // path of inner documents that will also be focused } + +/** + * if there's an options.effect, it will be handled from linkFollowHighlight. We delay the start of + * the highlight so that the target document can be somewhat centered so that the effect/highlight will be seen + * bcz: should this delay be an options parameter? + * @param options + * @returns + */ +export function FocusEffectDelay(options: FocusViewOptions) { + return (options.zoomTime ?? 0) * 0.5; +} |
