diff options
| author | Stephen Blott | 2016-02-01 05:23:03 +0000 |
|---|---|---|
| committer | Stephen Blott | 2016-02-01 05:23:03 +0000 |
| commit | aaf9e183db8cda326daa1ae3da1992caa69a427b (patch) | |
| tree | a259341b7d816bc14f44ad26b96ed2247f3c5549 /lib | |
| parent | 63e2387853d69b39454e71ec8006d2b512e86248 (diff) | |
| download | vimium-aaf9e183db8cda326daa1ae3da1992caa69a427b.tar.bz2 | |
Focus input: use Rect.copy element.getBoundingClientRect().
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/dom_utils.coffee | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/lib/dom_utils.coffee b/lib/dom_utils.coffee index 5284c813..7473df17 100644 --- a/lib/dom_utils.coffee +++ b/lib/dom_utils.coffee @@ -116,18 +116,6 @@ DomUtils = null # - # Returns the smallest rectangle which encloses element. Assumes that there is at least one rectangle. - # - getBoundingClientRect: (element) -> - [clientRect, rects...] = element.getClientRects() - for rect in rects - clientRect.top = Math.min clientRect.top, rect.top - clientRect.bottom = Math.max clientRect.bottom, rect.bottom - clientRect.left = Math.min clientRect.left, rect.left - clientRect.right = Math.max clientRect.right, rect.right - extend clientRect, width: clientRect.right - clientRect.left, height: clientRect.bottom - clientRect.top - - # # Bounds the rect by the current viewport dimensions. If the rect is offscreen or has a height or width < 3 # then null is returned instead of a rect. # |
