diff options
author | Kris Maglione <maglione.k@gmail.com> | 2011-10-09 20:49:34 -0400 |
---|---|---|
committer | Kris Maglione <maglione.k@gmail.com> | 2011-10-09 20:49:34 -0400 |
commit | d4444356000a1d4710ea3c6b4cbace3883954511 (patch) | |
tree | a0ecc4f2e7a1f4f3c64f3fecbe3bf62361a24f16 /common/modules | |
parent | 40d9642cc3b819ee549c07fdf420c82f0a9a99cd (diff) | |
download | pentadactyl-d4444356000a1d4710ea3c6b4cbace3883954511.tar.gz |
Zoom stuff.
Diffstat (limited to 'common/modules')
-rw-r--r-- | common/modules/buffer.jsm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/common/modules/buffer.jsm b/common/modules/buffer.jsm index bd632d57..184d9cda 100644 --- a/common/modules/buffer.jsm +++ b/common/modules/buffer.jsm @@ -175,7 +175,10 @@ var Buffer = Module("Buffer", { * @property {number} The current browser's zoom level, as a * percentage with 100 as 'normal'. */ - get zoomLevel() this.contentViewer[this.fullZoom ? "fullZoom" : "textZoom"] * 100, + get zoomLevel() { + let v = this.contentViewer; + return v[v.textZoom == 1 ? "fullZoom" : "textZoom"] * 100 + }, set zoomLevel(value) { this.setZoom(value, this.fullZoom); }, /** @@ -1162,7 +1165,7 @@ var Buffer = Module("Buffer", { fullZoom = ZoomManager.useFullZoom; let values = ZoomManager.zoomValues; - let cur = values.indexOf(ZoomManager.snap(this.zoom)); + let cur = values.indexOf(ZoomManager.snap(this.zoomLevel / 100)); let i = Math.constrain(cur + steps, 0, values.length - 1); util.assert(i != cur || fullZoom != ZoomManager.useFullZoom); |