Skip to content

Commit b82cf47

Browse files
author
David Baum
committed
move legend images to legend controller
1 parent 2c28d99 commit b82cf47

21 files changed

Lines changed: 64 additions & 43 deletions

ui/scripts/Legend/LegendController.js

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,41 @@
11
var legendController = (function() {
22

3-
var versionExplorerTreeID = "legendTree";
4-
var jQVersionExplorerTree = "#" + versionExplorerTreeID;
5-
var tree;
6-
var items = [];
3+
let versionExplorerTreeID = "legendTree";
4+
let jQVersionExplorerTree = "#" + versionExplorerTreeID;
5+
let tree;
6+
let items = [];
7+
8+
let icons = {
9+
redCircle: "scripts/Legend/images/circle_red.png",
10+
blueCircle: "scripts/Legend/images/circle_blue.png",
11+
greenCircle: "scripts/Legend/images/circle_green.png",
12+
grayCircle: "scripts/Legend/images/circle_gray.png",
13+
purpleCircle: "scripts/Legend/images/circle_purple.png",
14+
yellowCircle: "scripts/Legend/images/circle_yellow.png",
15+
lightBlueCircle: "scripts/Legend/images/circle_blue_light.png",
16+
greenRedGradient: "scripts/Legend/images/gradient_green-red.png",
17+
circleWidth: "scripts/Legend/images/circle_width.png",
18+
navigation: "scripts/Legend/images/navigation.png",
19+
leftMouseButton: "scripts/Legend/images/left.png",
20+
rightMouseButton: "scripts/Legend/images/right.png",
21+
midMouseButton: "scripts/Legend/images/middle.png",
22+
doubleClick: "scripts/Legend/images/double.png",
23+
scrolling: "scripts/Legend/images/scrolling.png"
24+
};
725
var controllerConfig = {
826
entries: []
927
};
1028

1129
function initialize(setupConfig){
1230
application.transferConfigParams(setupConfig, controllerConfig);
1331
}
14-
32+
1533
function activate(rootDiv){
1634
//create zTree div-container
17-
var zTreeDiv = document.createElement("DIV");
35+
let zTreeDiv = document.createElement("DIV");
1836
zTreeDiv.id = "zTreeDiv";
1937

20-
var versionExplorerTreeUL = document.createElement("UL");
38+
let versionExplorerTreeUL = document.createElement("UL");
2139
versionExplorerTreeUL.id = versionExplorerTreeID;
2240
versionExplorerTreeUL.setAttribute("class", "ztree");
2341

@@ -27,16 +45,16 @@ var legendController = (function() {
2745
//create zTree
2846
prepareTreeView();
2947
}
30-
48+
3149
function reset(){
3250
prepareTreeView();
3351
}
3452

3553
function createItem(entry, parent) {
36-
var item = { id: entry.name, parentId: parent, name: entry.name, iconSkin: "zt", icon: entry.icon, open: true, glossary: entry.glossary };
54+
let item = { id: entry.name, parentId: parent, name: entry.name, iconSkin: "zt", icon: icons[entry.icon], open: true, glossary: entry.glossary };
3755
items.push(item);
3856
if(entry.entries !== undefined) {
39-
var parentid = entry.name;
57+
let parentid = entry.name;
4058
entry.entries.forEach(function(entry){
4159
createItem(entry, parentid);
4260
});

ui/setups/web/method.png renamed to ui/scripts/Legend/images/circle_blue_light.png

File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)