Opening a plugin at a given location does not work any more ?
-
@vicb What do you mean by "passed location"? The plugin opens for the location on the map.
-
@Korina when you use the URL I give in the first post, the plugin is supposed to open at the location passed in the parameters wherever you physically are located.
It does not work anymore and the plugin opens at your current location.
I'm talking about the initial location, not subsequent plugin openings.
It is probably due to a running change in windy. I might be able to workaround that. -
So it is indeed something that break in windy at some point.
We use to be able to use
this.query
in the plugin to access the parsed query string. It is not defined any more.I've asked @rittels if he knows where this has moved and I will also try to dig a but in windy sources to figure out.
-
So digging into the code I found:
W.define("Plugin", ["rootScope", "utils", "trans"], (function(e, t, n, i) { var r = i.loadLangFile , o = function(e) { var t, n, i, r; this.initProperties(), this.dependencies = null !== (t = e.dependencies) && void 0 !== t ? t : this.dependencies, this.exclusive = e.exclusive, this.ident = e.ident, this.langFiles = e.langFiles, this.location = e.location, this.close = null !== (n = e.close) && void 0 !== n ? n : this.close, this.paramsChanged = null !== (i = e.paramsChanged) && void 0 !== i ? i : this.paramsChanged, this.redraw = null !== (r = e.redraw) && void 0 !== r ? r : this.redraw };
If you add a
this.query = e.query
in this code then the former behavior is restored and you can accessthis.query
in i.e. your pluginonopen
.@marekd Is that something that can be fixed in windy so that we restore the former behavior or is it intended and we need to retrieve the query from somewhere else?
-
@vicb The plugin system is being refactored, for now the query parameters can be found here:
W.plugins.plugins.pluginInfo["windy-plugin-xyz"].query
-
@rittels
W.plugins.plugins.pluginInfo
is undefined -
@vicb It is created when the plugins gallery is opened.
-
I was checking on windy.com/dev and it is not populated there - could this version be lagging behind?
I see it being populated on windy.com
-
@vicb Yes, it does not work in dev yet. In the new version it should work.
-
It would be nice if Windy gives more a little more consideration to plugin developers.
During the migration to TS we had to ask for a way to be able to test the plugins.
I have reported this query issue last September it nothing has been done since then - I think it would be an easy fix to make
this.query
available as it was before.Having a dev version (windy.com/dev) that is not in sync with windy.com does not help.
It seems like some other changes are on the way. I hope windy can provide a way to test the updates before they are released.
-
V vicb referenced this topic on