@@ -5,10 +5,10 @@ define(['d3', 'lib/knockout', 'scripts/Utils', 'dagre-d3', 'jquery', 'lettuce',
5
5
function setSkillNode ( ) {
6
6
ko . utils . arrayForEach ( skills_data . skills , function ( skill ) {
7
7
var value = skill ;
8
- value . label = skill . name ;
8
+ value . label = skill . title ;
9
9
value . height = value . width = 40 ;
10
10
value . rx = value . ry = 10 ;
11
- g . setNode ( skill . name , value ) ;
11
+ g . setNode ( skill . title , value ) ;
12
12
} ) ;
13
13
}
14
14
@@ -17,8 +17,8 @@ define(['d3', 'lib/knockout', 'scripts/Utils', 'dagre-d3', 'jquery', 'lettuce',
17
17
var skill_id = skill . id ;
18
18
if ( skill . depends ) {
19
19
ko . utils . arrayForEach ( skill . depends , function ( id ) {
20
- var dependents_name = Utils . getSkillById ( skills_data . skills , id ) . name ;
21
- var skill_name = Utils . getSkillById ( skills_data . skills , skill_id ) . name ;
20
+ var dependents_name = Utils . getSkillById ( skills_data . skills , id ) . title ;
21
+ var skill_name = Utils . getSkillById ( skills_data . skills , skill_id ) . title ;
22
22
g . setEdge ( dependents_name , skill_name , { label : '' , lineInterpolate : 'basis' } ) ;
23
23
} ) ;
24
24
}
@@ -42,7 +42,7 @@ define(['d3', 'lib/knockout', 'scripts/Utils', 'dagre-d3', 'jquery', 'lettuce',
42
42
43
43
inner . selectAll ( 'g.node' )
44
44
. attr ( 'data-bind' , function ( ) {
45
- return 'css: { \' can-add-points\' : canAddPoints, \' has-points\' : hasPoints, \' has-max-points\' : hasMaxPoints }' ;
45
+ return 'css: { " can-add-points" : canAddPoints, " has-points" : hasPoints, " has-max-points" : hasMaxPoints }' ;
46
46
} ) ;
47
47
inner . selectAll ( 'g.node rect' ) . attr ( 'data-bind' , function ( ) {
48
48
return 'click: addPoint, rightClick: removePoint' ;
@@ -51,6 +51,18 @@ define(['d3', 'lib/knockout', 'scripts/Utils', 'dagre-d3', 'jquery', 'lettuce',
51
51
/* add tips */
52
52
inner . selectAll ( 'g.node' )
53
53
. each ( function ( v , id ) {
54
+ if ( ! g . node ( v ) . books ) {
55
+ g . node ( v ) . books = {
56
+ label : "" ,
57
+ url : ""
58
+ }
59
+ }
60
+ if ( ! g . node ( v ) . links ) {
61
+ g . node ( v ) . links = {
62
+ label : "" ,
63
+ url : ""
64
+ }
65
+ }
54
66
var data = {
55
67
id : id ,
56
68
name : v ,
@@ -60,7 +72,7 @@ define(['d3', 'lib/knockout', 'scripts/Utils', 'dagre-d3', 'jquery', 'lettuce',
60
72
} ;
61
73
var results = lettuce . Template . tmpl ( description_template , data ) ;
62
74
$ ( this ) . tooltipster ( { content : $ ( results ) , contentAsHTML : true , interactive : true } ) ;
63
- $ ( this ) . find ( 'rect' ) . css ( "fill" , colors [ id ] [ 'font_color' ] ) ;
75
+ $ ( this ) . find ( 'rect' ) . css ( "fill" , '#ecf0f1' ) ;
64
76
} ) ;
65
77
66
78
svg . attr ( 'height' , g . graph ( ) . height + 120 ) ;
0 commit comments