usablica/intro.js — pull request #273 by MikeTheReader (2014-04-18 22:31:35+00:00)
Title: Implemented auto-positioning of tooltip windows.

I am somewhat new to intro.js, and first let me say that is a fantastic tool! The formatting and functionality out of the box is impressive.

I am working on a tour that is for a "full screen" page that has items the user can move around on screen. In this case, it's not possible at coding time to know if left, right, bottom, or top is best for a given item. In many cases, while the highlighting is correct, the bulk of the tooltip would appear off screen.

These changes allow the for the user to set "auto" for the global position or for a single element's position, and also to add a global positionPrecedence property to specify which position is preferred. The allowable positions of the tooltip will be calculated on the fly, and the one with the highest precedence is selected.

This is my first GitHub pull request, as well, so please be gentle.

Thanks.