mirror of
https://github.com/atom/atom.git
synced 2026-01-24 14:28:14 -05:00
Handle ranges with multiple rect in LineYardstick
This commit is contained in:
@@ -126,4 +126,8 @@ class LinesYardstick
|
||||
clientRectForRange: (textNode, startIndex, endIndex) ->
|
||||
@rangeForMeasurement.setStart(textNode, startIndex)
|
||||
@rangeForMeasurement.setEnd(textNode, endIndex)
|
||||
@rangeForMeasurement.getBoundingClientRect()
|
||||
clientRects = @rangeForMeasurement.getClientRects()
|
||||
if clientRects.length == 1
|
||||
clientRects[0]
|
||||
else
|
||||
@rangeForMeasurement.getBoundingClientRect()
|
||||
|
||||
Reference in New Issue
Block a user