Skip to content

Commit

Permalink
Use TextEditor::pixelRectForScreenRange
Browse files Browse the repository at this point in the history
  • Loading branch information
as-cii committed Sep 25, 2015
1 parent d2f996e commit 20acfdd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ColorPicker-view.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -357,9 +357,9 @@
# the middle of the selection range
# TODO: There can be lines over more than one row
if _match
_selectionPosition = _selection.marker.getPixelRange()
_selectionRect = Editor.pixelRectForScreenRange(_selection.getScreenRange())
_cursorPosition = Cursor.getPixelRect()
_cursorPosition.left = _selectionPosition.end.left - ((_selectionPosition.end.left - _selectionPosition.start.left) / 2)
_cursorPosition.left = _selectionRect.right - ((_selectionRect.right - _selectionRect.left) / 2)

# Figure out where to place the Color Picker
# ---------------------------
Expand Down

0 comments on commit 20acfdd

Please sign in to comment.