Skip to content

Commit 4579e7d

Browse files
committed
Slightly clearer comment. No logical changes
1 parent b791dc9 commit 4579e7d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

javascript/atoms/locators/relative.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,9 @@ bot.locators.relative.near_ = function (selector, opt_distance) {
174174
// | 2 |
175175
// +---+
176176
//
177-
// As you can see, the right hand side of 1 is "near" the left hand side
178-
// of 2. Of course, it might be that 2 is to the left of 1, in which case
179-
// we would be comparing the right hand side of 2 to the left hand side
180-
// of 1. Similar logic happens for top and bottom.
177+
// As you can see, the right hand side of 1 is "left of" the left-most
178+
// edge of 2. The top edge of 2 is at the same level as the bottom
179+
// edge of 1. This means that 1 is "above" 2, and 2 is "below" one.
181180

182181
// Distance from left edge to right edge
183182
var leftDistance = Math.abs(rect1.left - (rect2.left + rect2.width));

0 commit comments

Comments
 (0)