aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/InkingStroke.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-03-05 21:24:09 -0500
committerbobzel <zzzman@gmail.com>2023-03-05 21:24:09 -0500
commit0c38e4dc096d6abf82ef11286616856b7119c6e1 (patch)
treed61cb1b38a246a56905a0b24f6e81562b480934a /src/client/views/InkingStroke.tsx
parenta95043b3fd0325f79cae080bc71e8fe06432bdc3 (diff)
replace jumpToDocument with showDocument. restructure code to get rid of scrollFocus by adding getView() and fixing focus() and restoreTargetView
Diffstat (limited to 'src/client/views/InkingStroke.tsx')
-rw-r--r--src/client/views/InkingStroke.tsx8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/client/views/InkingStroke.tsx b/src/client/views/InkingStroke.tsx
index 73e46a553..4f08a8e22 100644
--- a/src/client/views/InkingStroke.tsx
+++ b/src/client/views/InkingStroke.tsx
@@ -91,18 +91,12 @@ export class InkingStroke extends ViewBoxBaseComponent<FieldViewProps>() {
if (anchor) {
anchor.backgroundColor = 'transparent';
// /* addAsAnnotation &&*/ this.addDocument(anchor);
- PresBox.pinDocView(anchor, { pinDocLayout: pinProps?.pinDocLayout, pinData: { ...(pinProps?.pinData ?? {}), pannable: true, inkable: true } }, this.rootDoc);
+ PresBox.pinDocView(anchor, { pinDocLayout: pinProps?.pinDocLayout, pinData: { ...(pinProps?.pinData ?? {}), inkable: true } }, this.rootDoc);
return anchor;
}
return this.rootDoc;
};
- scrollFocus = (docView: DocumentView, anchor: Doc, options: DocFocusOptions) => {
- if (this._subContentView) return this._subContentView?.scrollFocus?.(docView, anchor, options);
-
- const focusSpeed = options.instant ? 0 : options.zoomTime ?? 500;
- return PresBox.restoreTargetDocView(docView, anchor, focusSpeed) ? focusSpeed : undefined;
- };
/**
* @returns the center of the ink stroke in the ink document's coordinate space (not screen space, and not the ink data coordinate space);
* DocumentDecorations calls getBounds() on DocumentViews which call getCenter() if defined - in the case of ink it needs to be defined since