Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Delay to Display Traffic Graph on Weathermap Links #149

Open
jackfish0405 opened this issue Jun 14, 2024 · 7 comments
Open

Adding Delay to Display Traffic Graph on Weathermap Links #149

jackfish0405 opened this issue Jun 14, 2024 · 7 comments

Comments

@jackfish0405
Copy link

Version 1.0 or later, On the weathermap page, when hovering over a link, the corresponding traffic graph immediately appears. However, the speed is too fast, making it difficult to accurately interact with densely packed links as the graph appears almost instantly upon mouseover. I would like to modify it so that the traffic graph only appears 1-2 seconds after the mouse hovers over the corresponding link. Which parameters should be modified to achieve this?

@TheWitness
Copy link
Member

If you search for "hover" in the source, the numeric value there is in milliseconds.

It's a simple fix, but I'm busy now. See what you can do. It's using jQyeryUI dialog.

@TheWitness
Copy link
Member

Okay, look in weather-map.js. You will find 200 and 1000 values. The 200 is the entry delay, the 1000 is the time it takes before starting to fade out the graph.

You will have to force reload the cached script if you are using Chrome. Clearing the site browser cache should help there. There are plugins to help with that if you use Firefox for example.

@jackfish0405
Copy link
Author

Thanks for your help. I modified the content in the weathermap.js file,
wmHoverTimeout = setTimeout(adjustTooltipWindow, 200);
to wmHoverTimeout = setTimeout(adjustTooltipWindow, 2000);
and cleared Chrome's cache, but it seems to have no effect. Is there anything else I need? operate?

@TheWitness
Copy link
Member

You didn't modify the fade attribute that was so important one.

@jackfish0405
Copy link
Author

I modified it again, and now I find that it sometimes takes effect and sometimes does not take effect when the mouse is moved over it.

        wmHoverTimeout = setTimeout(adjustTooltipWindow, 3000);
    },
    close: function(event, ui) {
        ui.tooltip.hover(
            function() {
                $(this).stop(true).fadeTo(3000, 1);
            },
            function() {
                $(this).fadeOut(3000, function() {
                    $(this).remove();
                });
            }
        );
    },

8

@TheWitness
Copy link
Member

I have some other examples floating around, but it'll likely take me a few more days to dig them out as it's the weekend you know.

@channdy
Copy link

channdy commented Jul 24, 2024

Hi @TheWitness, I am encountered the same issue. I want to have a small delay on mouse hover for each link and I have modified as follow but seems not take effect. Please help me on this. Thanks

wmHoverTimeout = setTimeout(adjustTooltipWindow, 5000);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants