File tree Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Expand file tree Collapse file tree 3 files changed +17
-1
lines changed Original file line number Diff line number Diff line change 20
20
< script src = "src/creator.js "> </ script >
21
21
< script src = "src/fileWrite.js "> </ script >
22
22
< script src = "src/menu.js "> </ script >
23
+ < script src = "src/ui.js "> </ script >
23
24
</ html >
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " graph-creator" ,
3
- "version" : " 0.3 .3" ,
3
+ "version" : " 0.4 .3" ,
4
4
"main" : " index.html" ,
5
5
"window" : {
6
6
"height" : 1024 ,
Original file line number Diff line number Diff line change
1
+ //Handles parts of the user interface like zoom and keyboard shortcuts
2
+
3
+ //Change the zoom level upon ctrl + mousewheel
4
+ const win = nw . Window . get ( ) ;
5
+
6
+ window . addEventListener ( 'wheel' , function ( e ) {
7
+ if ( e . ctrlKey ) {
8
+ if ( e . deltaY > 0 ) {
9
+ win . zoomLevel -= 0.5 ;
10
+ }
11
+ else {
12
+ win . zoomLevel += 0.5 ;
13
+ }
14
+ }
15
+ } ) ;
You can’t perform that action at this time.
0 commit comments