summaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
authorThomas F. K. Jorna <[email protected]>2021-08-01 18:03:56 +0200
committerThomas F. K. Jorna <[email protected]>2021-08-01 18:03:56 +0200
commit870fef3389a896c6d5c7ba22cef381be9d1ea95a (patch)
tree1e991127816f37530f1809e66e8f34e99243b0bf /pages
parenta989d8bb720f950e066b36a170e1db59918cbedc (diff)
fix: made local mode zoom more consistent
Diffstat (limited to 'pages')
-rw-r--r--pages/index.tsx9
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
}