2015-07-26 08:53:28 +00:00
|
|
|
let data = new Trie();
|
|
|
|
|
|
|
|
let json = {
|
2015-07-26 09:37:07 +00:00
|
|
|
"color": ["Red", "Rebecca", "Blue", "Cyan", "Pink", "Purple",
|
|
|
|
"Teal", "Black", "White", "Orange", "Yellow", "Green"],
|
2015-07-26 08:53:28 +00:00
|
|
|
"name": ["Jack", "James", "Alex", "Adam", "Mahdi", "Josh", "Scott",
|
|
|
|
"Pat", "Vincent", "Daniel", "Patrick", "Tim"],
|
|
|
|
"app": ["Atom", "Sublime", "Firefox", "Chrome", "Safari", "Mail",
|
|
|
|
"Blender", "Sketch", "Slack", "Finder", "Nightly", "Aurora",
|
2015-07-26 09:37:07 +00:00
|
|
|
"f.lux", "LookUp", "WunderList", "Instagram", "Toggl", "Mailbox"]
|
2015-07-26 08:53:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
for (let category in json) {
|
|
|
|
for (let item of json[category]) {
|
|
|
|
let node = data.add(item);
|
|
|
|
node.category = category;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
document.addEventListener('DOMContentLoaded', () => {
|
|
|
|
draw(true);
|
|
|
|
});
|