From 0ba686b64fcdbedffd636791e6d20d8eb1791693 Mon Sep 17 00:00:00 2001 From: "Thomas F. K. Jorna" Date: Thu, 22 Jul 2021 19:50:27 +0200 Subject: more merging --- org-roam-ui.el | 3 ++- pages/index.tsx | 16 ++++++---------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/org-roam-ui.el b/org-roam-ui.el index 9420bf3..716016c 100644 --- a/org-roam-ui.el +++ b/org-roam-ui.el @@ -123,9 +123,10 @@ ROWS is the sql result, while COLUMN-NAMES is the columns to use." (defun org-roam-ui-update () "Track changes within Emacs to update Org-roam UI. This function is added to `post-command-hook'." + (when (org-roam-buffer-p (current-buffer)) (setq org-roam-ui-current-node-id (or (org-roam-id-at-point) - org-roam-ui-current-node-id))) + org-roam-ui-current-node-id)))) (provide 'org-roam-ui) ;;; org-roam-ui.el ends here diff --git a/pages/index.tsx b/pages/index.tsx index 16a0f31..75f2db7 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -287,7 +287,7 @@ export interface TweakProps { setPhysics: any threeDim: boolean } -export const Tweaks = function(props: TweakProps) { +export const Tweaks = function (props: TweakProps) { const { physics, setPhysics, threeDim } = props return ( (null) @@ -603,12 +603,12 @@ export const Graph = function(props: GraphProps) { scope.nodeIds.length === 0 ? graphData : { - nodes: scopedNodes, - links: scopedLinks, - } + nodes: scopedNodes, + links: scopedLinks, + } useEffect(() => { - ; (async () => { + ;(async () => { const fg = threeDim ? graph3dRef.current : graph2dRef.current const d3 = await d3promise if (physics.gravityOn) { @@ -699,13 +699,9 @@ export const Graph = function(props: GraphProps) { nodeRelSize: physics.nodeRel, nodeVal: (node) => { const links = linksByNodeId[node.id!] ?? [] -<<<<<<< variant A const basicSize = 3 + links.length const highlightSize = highlightedNodes[node.id!] ? physics.highlightNodeSize : 1 return basicSize * highlightSize ->>>>>>> variant B - return 3 + links.length -======= end }, nodeCanvasObject: (node, ctx, globalScale) => { if (!physics.labels) { -- cgit v1.2.3