summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--org-roam-ui.el2
-rw-r--r--pages/index.tsx4
2 files changed, 4 insertions, 2 deletions
diff --git a/org-roam-ui.el b/org-roam-ui.el
index 4084f43..8a3a5b3 100644
--- a/org-roam-ui.el
+++ b/org-roam-ui.el
@@ -136,7 +136,7 @@ This serves the web-build and API over HTTP."
(defun org-roam-ui--update-current-node ()
(let* ((node (org-roam-id-at-point)))
- (unless (string-match-p (regexp-quote "Minibuf") (current-buffer))
+ (unless (string-match-p (regexp-quote "Minibuf") (buffer-name (current-buffer)))
(unless (string= org-roam-ui--ws-current-node node)
(setq org-roam-ui--ws-current-node node)
(websocket-send-text oru-ws (json-encode `((type . "command") (data . ((commandName . "follow") (id . ,node))))))))))
diff --git a/pages/index.tsx b/pages/index.tsx
index 69885e7..c4cc011 100644
--- a/pages/index.tsx
+++ b/pages/index.tsx
@@ -342,7 +342,9 @@ export const Graph = function (props: GraphProps) {
// zoomToFit off a little bit
setTimeout(() => {
const fg = threeDim ? graph3dRef.current : graph2dRef.current
- fg?.zoomToFit(0, numbereWithinRange(20, 200, windowWidth / 8))
+ fg?.zoomToFit(1000, numbereWithinRange(20, 200, windowWidth / 8), (node: NodeObject) =>
+ scopedNodeIds.some((n) => n === node.id),
+ )
}, 1)
}, [JSON.stringify(scopedNodeIds)])