You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use it in a partial view that gets updated trough ajax, but everytime the javascript is included and executed when the partial view is updated. I'd like an option to not load the scripts, or maybe conditionally?
The text was updated successfully, but these errors were encountered:
What a lovely edge case, what I can suggest is output the map twice, the first one place close to the start of your HTML but wrap it in a <div style="visibility: hidden;"> or <div style="position:none;"> this will include the scripts only once.
Yeah, I can see that its an edge case. Still having an option would be nice 😀
Outputting twice does not solve the problem. The partial view is refreshed, so it does not know of any existing instance on the page.
Also it doesn't matter if its hidden or positioned somewhere else, the script tags gets read after inserting in the dom anyway.
I believe terratype outputs the scripts always on the first instance, but it can't know if its called in a child action. A switch would help me without breaking existing implementations.
I use it in a partial view that gets updated trough ajax, but everytime the javascript is included and executed when the partial view is updated. I'd like an option to not load the scripts, or maybe conditionally?
The text was updated successfully, but these errors were encountered: