start to do stuff that may/may not work
This commit is contained in:
parent
0562134157
commit
8f100d99cb
3 changed files with 13 additions and 10 deletions
7
frontend/src/Metamaps/Active.js
Normal file
7
frontend/src/Metamaps/Active.js
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
const Active = {
|
||||||
|
Map: null,
|
||||||
|
Topic: null,
|
||||||
|
Mapper: null
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Active
|
|
@ -7,11 +7,6 @@ Metamaps.tempNode = null
|
||||||
Metamaps.tempInit = false
|
Metamaps.tempInit = false
|
||||||
Metamaps.tempNode2 = null
|
Metamaps.tempNode2 = null
|
||||||
|
|
||||||
Metamaps.Active = Metamaps.Active || {
|
|
||||||
Map: null,
|
|
||||||
Topic: null,
|
|
||||||
Mapper: null
|
|
||||||
};
|
|
||||||
|
|
||||||
Metamaps.Maps = Metamaps.Maps || {}
|
Metamaps.Maps = Metamaps.Maps || {}
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
/* global $ */
|
/* global $ */
|
||||||
window.Metamaps = window.Metamaps || {}
|
|
||||||
|
|
||||||
import './Constants'
|
import './Constants'
|
||||||
|
|
||||||
import Account from './Account'
|
import Account from './Account'
|
||||||
|
import Active from './Active'
|
||||||
import Admin from './Admin'
|
import Admin from './Admin'
|
||||||
import AutoLayout from './AutoLayout'
|
import AutoLayout from './AutoLayout'
|
||||||
import Backbone from './Backbone'
|
import Backbone from './Backbone'
|
||||||
|
@ -32,6 +32,7 @@ import Visualize from './Visualize'
|
||||||
import ReactComponents from './ReactComponents'
|
import ReactComponents from './ReactComponents'
|
||||||
|
|
||||||
Metamaps.Account = Account
|
Metamaps.Account = Account
|
||||||
|
Metamaps.Active = Active
|
||||||
Metamaps.Admin = Admin
|
Metamaps.Admin = Admin
|
||||||
Metamaps.AutoLayout = AutoLayout
|
Metamaps.AutoLayout = AutoLayout
|
||||||
Metamaps.Backbone = Backbone
|
Metamaps.Backbone = Backbone
|
||||||
|
@ -59,9 +60,9 @@ Metamaps.Util = Util
|
||||||
Metamaps.Views = Views
|
Metamaps.Views = Views
|
||||||
Metamaps.Visualize = Visualize
|
Metamaps.Visualize = Visualize
|
||||||
|
|
||||||
$(document).ready(function () {
|
document.addEventListener("DOMContentLoaded", function() {
|
||||||
// initialize all the modules
|
// initialize all the modules
|
||||||
for (var prop in Metamaps) {
|
for (const prop in Metamaps) {
|
||||||
// this runs the init function within each sub-object on the Metamaps one
|
// this runs the init function within each sub-object on the Metamaps one
|
||||||
if (Metamaps.hasOwnProperty(prop) &&
|
if (Metamaps.hasOwnProperty(prop) &&
|
||||||
Metamaps[prop] != null &&
|
Metamaps[prop] != null &&
|
||||||
|
@ -73,7 +74,7 @@ $(document).ready(function () {
|
||||||
}
|
}
|
||||||
// load whichever page you are on
|
// load whichever page you are on
|
||||||
if (Metamaps.currentSection === "explore") {
|
if (Metamaps.currentSection === "explore") {
|
||||||
var capitalize = Metamaps.currentPage.charAt(0).toUpperCase() + Metamaps.currentPage.slice(1)
|
const capitalize = Metamaps.currentPage.charAt(0).toUpperCase() + Metamaps.currentPage.slice(1)
|
||||||
|
|
||||||
Metamaps.Views.exploreMaps.setCollection( Metamaps.Maps[capitalize] )
|
Metamaps.Views.exploreMaps.setCollection( Metamaps.Maps[capitalize] )
|
||||||
if (Metamaps.currentPage === "mapper") {
|
if (Metamaps.currentPage === "mapper") {
|
||||||
|
@ -96,4 +97,4 @@ $(document).ready(function () {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
export default window.Metamaps
|
export default Metamaps
|
||||||
|
|
Loading…
Reference in a new issue