diff options
author | Thomas F. K. Jorna <[email protected]> | 2021-07-22 19:50:27 +0200 |
---|---|---|
committer | Thomas F. K. Jorna <[email protected]> | 2021-07-22 19:50:27 +0200 |
commit | 0ba686b64fcdbedffd636791e6d20d8eb1791693 (patch) | |
tree | 7ab8236d5099390bfcbd7dadc06756442345dcd1 | |
parent | baf30cbfe147a936d36d25f61fd2d1088dbd7418 (diff) |
more merging
-rw-r--r-- | org-roam-ui.el | 3 | ||||
-rw-r--r-- | 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 ( <Box @@ -535,7 +535,7 @@ export interface GraphProps { emacsNodeId: string | null } -export const Graph = function(props: GraphProps) { +export const Graph = function (props: GraphProps) { const { physics, graphData, threeDim, linksByNodeId, emacsNodeId } = props const graph2dRef = useRef<any>(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) { |