-
Notifications
You must be signed in to change notification settings - Fork 1
/
demo.html
94 lines (74 loc) · 1.98 KB
/
demo.html
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="resizable-style.css">
<title> Resize Window </title>
<script src="resizable.js"></script>
<style>
#win5,
#win14 {
background-color: limegreen;
}
#win9,
#win4 {
background-color:lightseagreen;
}
#win12,
#win6 {
background-color: #B4E0DE;
}
#win13,
#win8 {
background-color: maroon;
}
</style>
</head>
<body>
<div id="main">
<div class="resizable-left" id="win1">
<div class="resizable-top" id="win3">
<div class="resizable-left" id="win5"></div>
<div class="resizable-right" id="win6"></div>
</div>
<div class="resizable-bottom" id="win4"></div>
</div>
<div class="resizable-right" id="win2">
<div class="resizable-top" id="win7">
<div class="resizable-left" id="win9"></div>
<div class="resizable-right" id="win10">
<div class="resizable-top" id="win11">
<div class="resizable-left" id="win13"></div>
<div class="resizable-right" id="win14"></div>
</div>
<div class="resizable-bottom" id="win12"></div>
</div>
</div>
<div class="resizable-bottom" id="win8"></div>
</div>
</div>
</body>
<script>
document.addEventListener("DOMContentLoaded", () => {
//...
document.getElementById("main").style.width = window.innerWidth + "px";
document.getElementById("main").style.height = window.innerHeight + "px";
var sizes = {
"win1": 0.5,
"win3": 0.75,
"win4": 0.5,
"win6": 0.4,
"win11": 0.8,
"win9": 0.5,
"win13": 0.4
};
//Resizable.initialise("main", sizes);
Resizable.initialise("main", {});
});
window.addEventListener("resize", () => {
Resizable.activeContentWindows[0].changeSize(window.innerWidth, window.innerHeight);
Resizable.activeContentWindows[0].childrenResize();
});
</script>
</html>