metamaps--metamaps/views/maps/show.html.erb
2018-03-05 12:45:36 -05:00

19 lines
836 B
Text

<script>
Metamaps.currentSection = "map";
Metamaps.currentPage = { @map.id.to_s };
Metamaps.ServerData = Metamaps.ServerData || {}
Metamaps.ServerData.ActiveMap = { @map.to_json.html_safe };
Metamaps.ServerData.Mappers = { @allmappers.to_json.html_safe };
Metamaps.ServerData.Collaborators = { @allcollaborators.to_json.html_safe };
Metamaps.ServerData.Topics = { @alltopics.to_json(user: current_user).html_safe };
Metamaps.ServerData.Synapses = { @allsynapses.to_json.html_safe };
Metamaps.ServerData.Mappings = { @allmappings.to_json.html_safe };
Metamaps.ServerData.Messages = { @allmessages.to_json.html_safe };
Metamaps.ServerData.Stars = { @allstars.to_json.html_safe };
Metamaps.ServerData.requests = { @allrequests.to_json.html_safe };
Metamaps.ServerData.VisualizeType = "ForceDirected";
</script>