David Matthew
Forum Replies Created
-
Forum: Plugins
In reply to: [Ventus - Weather Map Widget & Shortcode] Touch behaviourHi fulcrum85, thank you again for the feedback and encouragement, and the idea about an OGN tracker plugin. I don’t know much about this topic but I will look into it! It seems like an interesting subject.
I’m glad the code worked for you, and I really appreciate your positive comments. It’s a reminder of how supportive the WordPress community can be and motivates me to keep contributing. ??
Forum: Plugins
In reply to: [Ventus - Weather Map Widget & Shortcode] Touch behaviourThanks very much fulcrum85, I really appreciate that!
Just to elaborate on the code snippet (not sure if you’re a web developer or not), if you wanted to just disable touch events on mobile and tablets, you could use something like this CSS:
#id-of-containing-div { pointer-events: none; } @media (min-width: 992px) { #id-of-containing-div { pointer-events: auto; } }
Thanks,
DavidForum: Plugins
In reply to: [Ventus - Weather Map Widget & Shortcode] Touch behaviourHi fulcrum85,
Unfortunately this would involve a change of the underlying windy widget (developed by windy.com), for which Ventus is essentially a wrapper.
You might be able to implement a workaround by wrapping the Ventus shortcode in a div, and setting pointer-events to none, e.g.
<div style="pointer-events: none">[ventus]</div>
With a media query, you could implement this on mobile devices only. Please note though that this isn’t supported by the widget and is not intended as a solution per se, only a suggested workaround.
Hope this helps.
Thanks,
DavidHi Alex,
It turns out this issue was reported before – my apologies, I got a little mixed up!
I have actually already reported this to the developers of the Windy Widget – see here: https://community.windy.com/topic/7918/wind-directions-hidden-by-scrollbar-in-widget
As Ventus is a WordPress-wrapper for the Windy widget, I can’t affect the development of the widget itself, so I’m hopeful it will be fixed in a future release. The only consolation in the meantime is that only happens on Firefox, and the Firefox browser market share is pretty low – just over 3% at last count.
Hope this helps.
Thanks,
DavidHi Alex,
I haven’t encountered that issue before. Can you confirm what platform and browser you’re using, and whether you get the same issue when you check the my own test page (url below). I wasn’t able to see any instance of Ventus embedded on the link you provided.
https://davidmatthew.ie/ventus-test
Thanks,
DavidClosed.
- This reply was modified 2 years, 8 months ago by David Matthew.
Hi @cimarinesafariadventures, thanks for this additional information, it’s very helpful! And many thanks for your supportive feedback, I really appreciate it. If there’s anything I can help with don’t hesitate to ask.
Hi a4jp,
The windy widget unfortunately doesn’t support setting the language; it is set based on a user’s browser settings.
See https://community.windy.com/topic/3493/url-for-widget-forecast-with-language/3
There have been many requests for this feature by the community and as soon as the windy developers implement it, I can make it available via the Ventus plugin.
If you have any other questions don’t hesitate to ask.
Thanks,
DavidMarking as resolved for now.
Hi a4jp,
Thanks for getting in touch.
This feature is currently an either-or option; displaying both simultaneously isn’t supported by the windy widget.
Should this change however I will be more than happy to update Ventus with this functionality.
Thanks,
DavidHi MartaLi,
Can you send me a sample URL? I’ve not encountered this behaviour as Ventus doesn’t require the user location to function.
It will also be another week before I can access a laptop as I’m currently away at the moment, just in case I don’t get to your reply in a timely manner.
Thanks for your understanding.
Regards,
DavidI can share the code here no problem. It’s not particularly elegant but should do the job:
First wrap the widget in a containing element, e.g.
<div id="windy"> <iframe width="100%" height="450" src="https://embed.windy.com/embed2.html?lat=50.903&lon=-6.240&detailLat=53.338&detailLon=-6.259&width=650&height=450&zoom=5&level=surface&overlay=wind&product=ecmwf&menu=&message=&marker=&calendar=now&pressure=&type=map&location=coordinates&detail=true&metricWind=default&metricTemp=default&radarRange=-1" frameborder="0"></iframe> </div>
Then you can inline the JavaScript in a Custom HTML block, attaching it to a button:
<button onclick="(function(){let d = document.getElementById('windy'), w = document.querySelector('#windy iframe'); w.remove(); d.appendChild(w);})()">Reload</button> the iframe if not centered correctly.
Generally speaking, inlining a function like this isn’t best practice but as a once-off it should be fine.
Hope this helps! And thanks for your patience.
Thanks @synergyhub for putting together all those test cases. I think I may need to flag this with the Windy developers, as it looks like a bug with the underlying Windy widget itself when the spot forecast is enabled.
I know this won’t provide any immediate solution for you; I can only suggest a couple of things for the time being:
– Disable the spot forecast on that particular page, and/or
– Create a reload frame button next to any problematic iframe, rather than a message to reload the full browser page.The latter is a feature I may introduce if this doesn’t get fixed soon. I’ve set up an example here: https://davidmatthew.ie/ventus-test/
Let me know if you’d like the code for this. Essentially it involves quickly removing and reattaching the iframe to the document, as trying to reload an iframe via a button seems to create cross-origin errors.
Hope this helps.
David
Hi @synergyhub, yes I can see what you mean. It only seems to centre properly once you refresh while the map is in the viewport (I tried refreshing when at the bottom of the screen and it wasn’t centred).
Can you please try the following:
– Excluding the spot forecast
– Embedding the widget manually from https://www.windy.com/-Embed-widget-on-page/widgets and seeing if the same problem occursThanks,
DavidForum: Plugins
In reply to: [Ventus - Weather Map Widget & Shortcode] Wrong WeatherMarking as resolved.