1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 08:37:59 +01:00

Make sure that the hint number is in the viewport

This commit is contained in:
Kris Maglione
2008-12-19 14:57:34 -05:00
parent 74700d3aff
commit f60ea76379
3 changed files with 51 additions and 43 deletions

View File

@@ -311,6 +311,15 @@ const util = { //{{{
identity: function identity(k) k,
intersection: function (r1, r2) ({
get width() this.right - this.left,
get height() this.bottom - this.top,
left: Math.max(r1.left, r2.left),
right: Math.min(r1.right, r2.right),
top: Math.max(r1.top, r2.top),
bottom: Math.min(r1.bottom, r2.bottom)
}),
map: function map(obj, fn)
{
let ary = [];