enyojs/spotlight — pull request #116 by aarontam (2014-02-17 19:18:25+00:00)
Title: ANG-178: Spot nearest control when switching from pointer to 5-way mode.

Issue
-------
When switching from pointer to 5-way mode, the last spotted control is spotted. For the user, this can result in unexpected behavior as they could potentially 5-way left and have the control on the right be spotted.

Fix
----
We now spot the nearest control to the pointer when switching to 5-way mode, using the existing nearest-neighbor algorithm.

Considerations
-------------------
I've tested this with all the `Moonstone` samples and some simple app implementations but am definitely looking for feedback as to how this could be better implemented and any potential issues with more complex interfaces.

This PR does not address the issue of switching for flyweight controls (the switching behavior does not seem to actually be functional for the existing implementation); another PR will be opened to address this at the control level.

Enyo-DCO-1.1-Signed-off-by: Aaron Tam