From 2ec7e59ca2b71c7f39928ff9645bb873156f12bd Mon Sep 17 00:00:00 2001 From: Max Franz Date: Fri, 30 Jun 2017 13:56:46 -0400 Subject: [PATCH] Zooming should take into account networks bar and history bar for centre #116 --- website-ui/js/app-result-shortcuts.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website-ui/js/app-result-shortcuts.js b/website-ui/js/app-result-shortcuts.js index 3fc9fe2b..ae42aa19 100644 --- a/website-ui/js/app-result-shortcuts.js +++ b/website-ui/js/app-result-shortcuts.js @@ -38,8 +38,8 @@ function( util ){ return function( Result ){ let zoomBy = mult => { let z = cy.zoom(); - let w = cy.width(); - let h = cy.height(); + let w = cy.width() - (rfn.networksExpanded ? $('#network-list').width() : 0); + let h = cy.height() - (rfn.historyExpanded ? $('#query-history').height() : 0); cy.zoom({ level: z * mult,