diff options
| author | mrmr1993 | 2014-12-18 11:56:53 +0000 |
|---|---|---|
| committer | mrmr1993 | 2014-12-18 11:56:53 +0000 |
| commit | 9c9c48598534c2a0cd8aec28a4a806d74f28e090 (patch) | |
| tree | e81d488340f8bb3106382908a3eefbdb58f2646a /lib/dom_utils.coffee | |
| parent | 3132ae601b2de787f9cddd3fd77b36767e2e467e (diff) | |
| download | vimium-9c9c48598534c2a0cd8aec28a4a806d74f28e090.tar.bz2 | |
Move rect functions to their own file
Diffstat (limited to 'lib/dom_utils.coffee')
| -rw-r--r-- | lib/dom_utils.coffee | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/dom_utils.coffee b/lib/dom_utils.coffee index 7e19a7fc..ebbed006 100644 --- a/lib/dom_utils.coffee +++ b/lib/dom_utils.coffee @@ -95,7 +95,6 @@ DomUtils = else rect - getClientRectsForAreas: (imgClientRect, areas) -> rects = [] for area in areas @@ -114,7 +113,7 @@ DomUtils = # something more sophisticated, but likely not worth the effort. [x1, y1, x2, y2] = coords - rect = Utils.shiftRect (Utils.createRect x1, y1, x2, y2), imgClientRect.left, imgClientRect.top + rect = Rect.translate (Rect.create x1, y1, x2, y2), imgClientRect.left, imgClientRect.top rect = @cropRectToVisible rect rects.push {element: area, rect: rect} unless not rect or isNaN rect.top |
