From 886732446860833270ff7cd3977d41e933906c61 Mon Sep 17 00:00:00 2001 From: juliandescottes Date: Tue, 16 Aug 2016 09:53:14 +0200 Subject: [PATCH] Fix zoom centering when zooming with keyboard shortcuts --- src/js/controller/DrawingController.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/controller/DrawingController.js b/src/js/controller/DrawingController.js index 50e2158c..f163e6d3 100644 --- a/src/js/controller/DrawingController.js +++ b/src/js/controller/DrawingController.js @@ -278,7 +278,7 @@ var step = zoomMultiplier * this.getZoomStep_(); this.setZoom_(this.renderer.getZoom() + step); - if (centerCoords) { + if (typeof centerCoords === 'object') { var xRatio = (centerCoords.x - off.x) / oldWidth; var yRatio = (centerCoords.y - off.y) / oldHeight; var newWidth = this.getContainerWidth_() / this.renderer.getZoom();