-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlayout.js
68 lines (62 loc) · 1.33 KB
/
layout.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
const screens={
hp:{
width:1370,
height:768
},
samsung:{
width:1280,
height:1024
},
projector:{
width:800,
height:600,
}
}
const current_screen = screens.hp;
const layout={
developer:{
main:{
x:0,
y:0,
width:current_screen.width*0.5,
height:current_screen.height*0.5
},
canvas:{
x:current_screen.width*0.5,
y:0,
width:current_screen.width*0.5,
height:current_screen.height
},
devtools:{
x:0,
y:current_screen.height*0.5,
width:current_screen.width*0.5,
height:current_screen.height*0.5
}
}
}
const current_layout = layout.developer;
win.x = current_layout.main.x;
win.y=current_layout.main.y;
win.width=current_layout.main.width;
win.height=current_layout.main.height;
// dev_tools_win.x=current_layout.devtools.x;
// dev_tools_win.y=current_layout.devtools.y;
// dev_tools_win.width=current_layout.devtools.width;
// dev_tools_win.height=current_layout.devtools.height;
// console.log("dev_tools_win : ",dev_tools_win);
var new_win;
nw.Window.open('canvas.html',
{
x:current_layout.canvas.x,
y:current_layout.canvas.y,
// toolbar:false,
frame:false,
width:current_layout.canvas.width,
height:current_layout.canvas.height
},
init);
document.addEventListener('keydown',function (argument) {
console.log("argument : ",argument);
})
console.log("document : ",document);