From f33f99134b9b79d8753965176e145911c1aa7428 Mon Sep 17 00:00:00 2001 From: azivner Date: Tue, 30 Oct 2018 21:28:41 +0100 Subject: [PATCH] zoom fix --- .../services/note_detail_relation_map.js | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/src/public/javascripts/services/note_detail_relation_map.js b/src/public/javascripts/services/note_detail_relation_map.js index 49b00c2ea..39c5f72e9 100644 --- a/src/public/javascripts/services/note_detail_relation_map.js +++ b/src/public/javascripts/services/note_detail_relation_map.js @@ -121,17 +121,13 @@ function initPanZoom() { }); if (mapData.transform) { - console.log(mapData.transform); - - pz.moveTo(mapData.transform.x, mapData.transform.y); pz.zoomTo(0, 0, mapData.transform.scale); + pz.moveTo(mapData.transform.x, mapData.transform.y); } pz.on('zoom', function (e) { mapData.transform = pz.getTransform(); - console.log(mapData.transform); - saveData(); }); @@ -141,17 +137,8 @@ function initPanZoom() { saveData(); }, true); - $zoomInButton.click(() => { - const transform = pz.getTransform(); - - pz.zoomTo(0, 0, 1.2); - }); - - $zoomOutButton.click(() => { - const transform = pz.getTransform(); - - pz.zoomTo(0, 0, 0.8); - }); + $zoomInButton.click(() => pz.zoomTo(0, 0, 1.2)); + $zoomOutButton.click(() => pz.zoomTo(0, 0, 0.8)); } async function initJsPlumb () {