diff options
author | Thomas F. K. Jorna <[email protected]> | 2021-08-01 18:03:56 +0200 |
---|---|---|
committer | Thomas F. K. Jorna <[email protected]> | 2021-08-01 18:03:56 +0200 |
commit | 870fef3389a896c6d5c7ba22cef381be9d1ea95a (patch) | |
tree | 1e991127816f37530f1809e66e8f34e99243b0bf /pages | |
parent | a989d8bb720f950e066b36a170e1db59918cbedc (diff) |
fix: made local mode zoom more consistent
Diffstat (limited to 'pages')
-rw-r--r-- | pages/index.tsx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/pages/index.tsx b/pages/index.tsx index 82c203c..7789a38 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -173,14 +173,16 @@ export function GraphPage() { if (!sr.nodeIds.length) { setScope({ nodeIds: [emacsNode] }) setTimeout(() => { - fg.zoomToFit(speed, padding, (node: OrgRoamNode) => nodes[node.id!]) + /* fg.zoomToFit(speed, padding, (node: OrgRoamNode) => nodes[node.id!]) */ + fg.centerAt(0, 0, speed) }, 50) return } if (bh.localSame !== 'add') { setScope({ nodeIds: [emacsNode] }) setTimeout(() => { - fg.zoomToFit(speed, padding, (node: OrgRoamNode) => nodes[node.id!]) + /* fg.zoomToFit(speed, padding, (node: OrgRoamNode) => nodes[node.id!]) */ + fg.centerAt(0, 0, speed) }, 50) return } @@ -194,7 +196,8 @@ export function GraphPage() { ) { setScope({ nodeIds: [emacsNode] }) setTimeout(() => { - fg.zoomToFit(speed, padding, (node: OrgRoamNode) => nodes[node.id!]) + /* fg.zoomToFit(speed, padding, (node: OrgRoamNode) => nodes[node.id!]) */ + fg.centerAt(0, 0, speed) }, 50) return } |