aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/FieldView.tsx
diff options
context:
space:
mode:
authorgeireann <geireann.lindfield@gmail.com>2024-04-28 16:01:49 -0400
committergeireann <geireann.lindfield@gmail.com>2024-04-28 16:01:49 -0400
commitab873e90112f2cac204a57a1b405cc241f7e8381 (patch)
tree763a93ed2d584916d08e12770d39c6ddb377c5f0 /src/client/views/nodes/FieldView.tsx
parent729114c0867e3cc8d8e0668bae451976b387cb34 (diff)
cleaned up explore mode to use focus(). fixed focusing on group doc elements to not focus on group first.
Diffstat (limited to 'src/client/views/nodes/FieldView.tsx')
-rw-r--r--src/client/views/nodes/FieldView.tsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/nodes/FieldView.tsx b/src/client/views/nodes/FieldView.tsx
index c2f946a88..52dc632ae 100644
--- a/src/client/views/nodes/FieldView.tsx
+++ b/src/client/views/nodes/FieldView.tsx
@@ -22,7 +22,7 @@ export interface FocusViewOptions {
docTransform?: Transform; // when a document can't be panned and zoomed within its own container (say a group), then we need to continue to move up the render hierarchy to find something that can pan and zoom. when this happens the docTransform must accumulate all the transforms of each level of the hierarchy
instant?: boolean; // whether focus should happen instantly (as opposed to smooth zoom)
preview?: boolean; // whether changes should be previewed by the componentView or written to the document
- effect?: Doc; // animation effect for focus
+ effect?: Doc; // animation effect for focus // bcz: needs to be changed to something more generic than a Doc
noSelect?: boolean; // whether target should be selected after focusing
playAudio?: boolean; // whether to play audio annotation on focus
playMedia?: boolean; // whether to play start target videos
@@ -30,6 +30,7 @@ export interface FocusViewOptions {
zoomTextSelections?: boolean; // whether to display a zoomed overlay of anchor text selections
toggleTarget?: boolean; // whether to toggle target on and off
easeFunc?: 'linear' | 'ease'; // transition method for scrolling
+ pointFocus?: {X:number, Y: number }; // clientX and clientY coordinates to focus on instead of a document target (used by explore mode)
}
export type FocusFuncType = (doc: Doc, options: FocusViewOptions) => Opt<number>;
// eslint-disable-next-line no-use-before-define