WordPress.org

Ready to get started?Download WordPress

Forums

Google Analyticator
ToolTip Fix (3 posts)

  1. Sudavar
    Member
    Posted 10 months ago #

    In the summary widget in admin control panel, there is a problem with the tooltip shown after hovering over the most recent days (last dots on the graph).

    As the tooltip is shown 20px to the right of pointer and the pointer is close to the right end of the window, a scroll bar appears and the tooltip is not visible (not at all for the last day, a little for the previous day etc) Example

    If you add this code:

    var wdw = jQuery( window ).width();
    if(item.pageX > (wdw - wdw*0.08))
    	item.pageX -= 170;

    before calling showTooltip() in file: google-analytics-summary-widget.php line 84 problem seems to solve as shown here

    http://wordpress.org/plugins/google-analyticator/

  2. bradlis7
    Member
    Posted 9 months ago #

    Noticed this bug myself. I changed wdw*0.08 to wdw*0.12. Don't really want to dig into the code at the moment, but maybe if you could get the width of the box, and anything to the right half of the widget box, make the tooltip go left, and anything on the left half, make it go to the right.

  3. Sudavar
    Member
    Posted 9 months ago #

    As i said before (as the plugin is written now) the tooltip is shown some pixels right to the cursor (sorry not pointer) when you hover over a dot (day). So my thought was that if the cursor is closer than 8% to the right side of the screen, then the tooltip should appear 170px left from the cursor, making it appear to the left of the pointer not to the right.

    As for your idea, it will complicate the code (as it is written now). Besides when your dashboard is on the 1rst column of admin panel, it is far away from the right side so the tooltip will be always visible.

Reply

You must log in to post.

About this Plugin

About this Topic