File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " graph-creator" ,
3
- "version" : " 0.7 .8" ,
3
+ "version" : " 0.8 .8" ,
4
4
"main" : " index.html" ,
5
5
"window" : {
6
6
"height" : 1024 ,
Original file line number Diff line number Diff line change @@ -37,8 +37,10 @@ function renderGraph(img){
37
37
38
38
} ) ;
39
39
40
- //Set our background image
41
- $ ( '#container' ) . css ( 'background-image' , 'url(' + img . src + ')' ) ;
40
+ //Set our background image if it's provided
41
+ if ( img != null ) {
42
+ $ ( '#container' ) . css ( 'background-image' , 'url(' + img . src + ')' ) ;
43
+ }
42
44
43
45
//Bind our event handlers
44
46
cy . on ( 'tap' , 'edge' , removeEdge ) ;
Original file line number Diff line number Diff line change 2
2
var menu = new nw . Menu ( { type : 'menubar' } ) ;
3
3
4
4
var fileSubmenu = new nw . Menu ( ) ;
5
+
6
+ fileSubmenu . append ( new nw . MenuItem ( {
7
+ label : 'New' ,
8
+ click : renderGraph
9
+ } ) ) ;
10
+
5
11
fileSubmenu . append ( new nw . MenuItem ( {
6
12
label : 'Load Background' ,
7
13
click : openImage
You can’t perform that action at this time.
0 commit comments