If the width of the tourtip + target element exceeds the container it's in, the left position of the tourtip used to become negative, leaving part of the tourtip off the screen.
This PR limits the left and right position of a tourtip when needed. Moreover, it debounces position updates on resizing of the browser window (with a 50ms threshold) to avoid sluggish browser resizing.
If the width of the tourtip + target element exceeds the container it's in, the left position of the tourtip used to become negative, leaving part of the tourtip off the screen.
This PR limits the left and right position of a tourtip when needed. Moreover, it debounces position updates on resizing of the browser window (with a 50ms threshold) to avoid sluggish browser resizing.