HomePhabricator

Make JX.Tooltip more conservative about positioning

Description

Make JX.Tooltip more conservative about positioning

Summary:
Fixes T10687. Fixes T12064.

  • Primarily, adds a margin around the edge of the screen for the purposes of aligning the tooltip.
  • Also, tries to flip the tooltip if it can (e.g., if the tooltip normally goes east, try west first), then tries other positions exhastively.

Test Plan:

Screen Shot 2017-01-05 at 8.48.28 AM.png (207×226 px, 8 KB)

Screen Shot 2017-01-05 at 8.49.17 AM.png (266×318 px, 15 KB)

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12064, T10687

Differential Revision: https://secure.phabricator.com/D17145