Fixed popup zoom
This commit is contained in:
parent
c7cf9b4be7
commit
c713977bb6
@ -258,7 +258,7 @@ class CommsServer {
|
||||
}
|
||||
this.settings.save();
|
||||
} else if (message.cmd === 'set-zoom') {
|
||||
this.setToActive(message);
|
||||
this.sendToActive(message);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user