Skip to content

Commit 1bb8305

Browse files
committed
Added making new empty graphs.
1 parent 505af93 commit 1bb8305

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "graph-creator",
3-
"version": "0.7.8",
3+
"version": "0.8.8",
44
"main": "index.html",
55
"window": {
66
"height": 1024,

src/cytoInit.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@ function renderGraph(img){
3737

3838
});
3939

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+
}
4244

4345
//Bind our event handlers
4446
cy.on('tap', 'edge', removeEdge);

src/menu.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
var menu = new nw.Menu({type: 'menubar'});
33

44
var fileSubmenu = new nw.Menu();
5+
6+
fileSubmenu.append(new nw.MenuItem({
7+
label: 'New',
8+
click: renderGraph
9+
}));
10+
511
fileSubmenu.append(new nw.MenuItem({
612
label: 'Load Background',
713
click: openImage

0 commit comments

Comments
 (0)