Class gui.ClosestXOffsetScanner
Defined in: ClosestXOffsetScanner.js.
Constructor Attributes | Constructor Name and Description |
---|---|
gui.ClosestXOffsetScanner(offset)
Finds the closest step to the specified offset, but comparing the left and right edges of the
surrounding rectangles to the desired offset.
|
Method Attributes | Method Name and Description |
---|---|
<inner> |
isFurtherFromOffset(edgeOffset)
Returns true if the supplied edgeOffset is further away from the desired offset
than one previously seen.
|
process(stepInfo, previousRect, nextRect)
|
|
<inner> |
updateDiffIfSmaller(edge)
Update the closestDiff if the supplied edge is closer to the offset
|
Class Detail
gui.ClosestXOffsetScanner(offset)
Finds the closest step to the specified offset, but comparing the left and right edges of the
surrounding rectangles to the desired offset. Iteration will continue until the steps
start getting further away from the current closest step.
- Parameters:
- {!number} offset
- Target horizontal offset
Method Detail
<inner>
{!boolean}
isFurtherFromOffset(edgeOffset)
Returns true if the supplied edgeOffset is further away from the desired offset
than one previously seen.
- Parameters:
- {?number} edgeOffset
- Returns:
- {!boolean}
{!boolean}
process(stepInfo, previousRect, nextRect)
- Parameters:
- {!gui.StepInfo} stepInfo
- {?ClientRect} previousRect
- {?ClientRect} nextRect
- Returns:
- {!boolean}
<inner>
{undefined}
updateDiffIfSmaller(edge)
Update the closestDiff if the supplied edge is closer to the offset
- Parameters:
- {?number} edge
- Returns:
- {undefined}