diff options
| author | mrmr1993 | 2017-11-11 16:13:22 +0000 |
|---|---|---|
| committer | mrmr1993 | 2017-11-20 19:42:23 +0000 |
| commit | 3f4c9638ac50f31de309b25be49cce4f06b65dc6 (patch) | |
| tree | aa869dbec609c2899414cd7f44dae3d7a8861fc7 /content_scripts | |
| parent | e8d0fe5f3f87b2ad753975a4485db348af7853fc (diff) | |
| download | vimium-3f4c9638ac50f31de309b25be49cce4f06b65dc6.tar.bz2 | |
Use Rect.translate to create rects for addFlashRect
Diffstat (limited to 'content_scripts')
| -rw-r--r-- | content_scripts/link_hints.coffee | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/content_scripts/link_hints.coffee b/content_scripts/link_hints.coffee index 96370bb4..07cec5f4 100644 --- a/content_scripts/link_hints.coffee +++ b/content_scripts/link_hints.coffee @@ -388,9 +388,8 @@ class LinkHintsMode installKeyboardBlocker = (startKeyboardBlocker) -> if linkMatched.isLocalMarker {top: viewportTop, left: viewportLeft} = DomUtils.getViewportTopLeft() - for rect in (Rect.copy rect for rect in clickEl.getClientRects()) - extend rect, top: rect.top + viewportTop, left: rect.left + viewportLeft - flashEl = DomUtils.addFlashRect rect + for rect in clickEl.getClientRects() + flashEl = DomUtils.addFlashRect Rect.translate rect, viewportLeft, viewportTop do (flashEl) -> HintCoordinator.onExit.push -> DomUtils.removeElement flashEl if windowIsFocused() |
