mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-21 07:07:58 +01:00
Fix some zi/zo issues.
This commit is contained in:
@@ -74,14 +74,13 @@ function Buffer() //{{{
|
|||||||
function bumpZoomLevel(steps, fullZoom)
|
function bumpZoomLevel(steps, fullZoom)
|
||||||
{
|
{
|
||||||
let values = ZoomManager.zoomValues;
|
let values = ZoomManager.zoomValues;
|
||||||
let i = values.indexOf(ZoomManager.snap(ZoomManager.zoom)) + steps;
|
let cur = values.indexOf(ZoomManager.snap(ZoomManager.zoom));
|
||||||
|
let i = cur + steps;
|
||||||
|
i = Math.max(0, Math.min(values.length - 1, i));
|
||||||
|
|
||||||
if (i >= 0 && i < values.length)
|
if (i == cur && fulZoom == ZoomManager.useFullZoom)
|
||||||
setZoom(Math.round(values[i] * 100), fullZoom);
|
|
||||||
// TODO: I'll leave the behaviour as is for now, but I think this
|
|
||||||
// should probably just take you to the respective bounds -- djk
|
|
||||||
else
|
|
||||||
liberator.beep();
|
liberator.beep();
|
||||||
|
setZoom(Math.round(values[i] * 100), fullZoom);
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkScrollYBounds(win, direction)
|
function checkScrollYBounds(win, direction)
|
||||||
|
|||||||
Reference in New Issue
Block a user