diff --git a/js/lib/Comms.js b/js/lib/Comms.js index be3d289..017515b 100644 --- a/js/lib/Comms.js +++ b/js/lib/Comms.js @@ -258,7 +258,7 @@ class CommsServer { } this.settings.save(); } else if (message.cmd === 'set-zoom') { - this.setToActive(message); + this.sendToActive(message); } } diff --git a/js/modules/Zoom.js b/js/modules/Zoom.js index 1ef71cb..fb748fe 100644 --- a/js/modules/Zoom.js +++ b/js/modules/Zoom.js @@ -59,13 +59,14 @@ class Zoom { } setZoom(scale){ - if(scale < this.minScale) { + // NOTE: SCALE IS NOT LOGARITHMIC + if(scale < Math.pow(this.minScale)) { scale = this.minScale; - } else if (scale > this.maxScale) { + } else if (scale > Math.pow(this.maxScale)) { scale = this.maxScale; } - this.scale = Math.pow(2, this.logScale); + this.scale = scale; this.conf.restoreAr(); }