obsidian-annotator
obsidian-annotator copied to clipboard
When click the link in markdown and jump to annotation in pdf, I can't show all annotations. The pdf is always focused on the same annotation.
When click the link in markdown and jump to annotation in pdf, I can't show all annotations. The pdf is always focused on the same annotation. If I scroll the pdf to other pages, it will scroll back to the annotation position where I click the link related.
The show all button does nothing.
The only way to unlock the focus is:
- click open as markdown in options, then
- reopen as annotation
I meet the same problem.
In order to fix this temporally, I changed following lines to enable scrolling from the jumped position.
diff --git a/src/annotatorView.tsx b/src/annotatorView.tsx
index 34ecc82..c32fc01 100644
--- a/src/annotatorView.tsx
+++ b/src/annotatorView.tsx
@@ -300,12 +300,12 @@ export default class AnnotatorView extends FileView {
newYOffset = document.getElementsByTagName('hypothesis-highlight')[0].getBoundingClientRect().y;
if (newYOffset != yoffset && annotationTargetType == 'pdf') {
- yoffset = newYOffset;
- setTimeout(g, 100);
+ //yoffset = newYOffset;
+ //setTimeout(g, 100);
}
} catch (e) {
if (annotationTargetType == 'pdf') {
- setTimeout(g, 100);
+ //setTimeout(g, 100);
} else if (this.plugin.settings.debugLogging) {
console.error(e);
}
@@ -313,9 +313,9 @@ export default class AnnotatorView extends FileView {
};
this.activeG = g;
try {
- setTimeout(function () {
- g();
- }, 1000);
+ //setTimeout(function () {
+ // g();
+ //}, 1000);