Fix zoom centering when zooming with keyboard shortcuts
This commit is contained in:
parent
1bf326fbd8
commit
8867324468
1 changed files with 1 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue