-
Notifications
You must be signed in to change notification settings - Fork 54
/
borderlayout-resize-ghost.html
executable file
·155 lines (132 loc) · 3.45 KB
/
borderlayout-resize-ghost.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<!doctype html>
<html>
<head>
<title>Resizing Border Layout example</title>
<meta charset="utf-8">
<link type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.6/themes/ui-lightness/jquery-ui.css" rel="stylesheet" />
<style>
html, body {
width: 100%;
height: 100%;
padding: 0;
margin: 0;
overflow: hidden;
}
.layout {
height: 100%;
}
.center, .east, .west, .north, .south {
background-color: white;
text-align: center;
display: inline-block;
padding: 1em;
}
.west, .east {
width: 8%;
}
.north, .south {
height: 10%;
}
/**
* These styles are to create custom resize handles.
*/
.ui-resizable-handle {
background-color: rgb(220, 220, 220);
text-align: center;
}
.ui-resizable-w, .ui-resizable-e {
width: 6px;
border-left: 1px solid rgb(210, 210, 210);
border-right: 1px solid rgb(210, 210, 210);
}
.ui-resizable-w {
left: -8px;
}
.ui-resizable-e {
right: -8px;
}
.ui-resizable-n, .ui-resizable-s {
height: 6px;
border-top: 1px solid rgb(210, 210, 210);
border-bottom: 1px solid rgb(210, 210, 210);
}
.ui-resizable-n {
top: -8px;
background:
}
.ui-resizable-s {
bottom: -8px;
}
.ui-resizable-helper-west {
border-right: 6px solid rgb(220, 220, 220);
}
.ui-resizable-helper-east {
border-left: 6px solid rgb(220, 220, 220);
}
.ui-resizable-helper-north {
border-bottom: 6px solid rgb(220, 220, 220);
}
.ui-resizable-helper-south {
border-top: 6px solid rgb(220, 220, 220);
}
.ui-icon {
}
</style>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
<script type="text/javascript" src="../lib/jquery.sizes.js"></script>
<script type="text/javascript" src="../lib/jlayout.border.js"></script>
<script type="text/javascript" src="../lib/jquery.jlayout.js"></script>
<script type="text/javascript">
jQuery(function($)
{
var container = $('.layout');
function layout() {
container.layout({resize: false, type: 'border', vgap: 8, hgap: 8});
}
$('.north').resizable({
handles: 's',
stop: layout,
helper: 'ui-resizable-helper-north'
});
$('.south').resizable({
handles: 'n',
stop: layout,
helper: 'ui-resizable-helper-south'
});
$('.east').resizable({
handles: 'w',
stop: layout,
helper: 'ui-resizable-helper-east'
});
$('.west').resizable({
handles: 'e',
stop: layout,
helper: 'ui-resizable-helper-west'
});
$(window).resize(layout);
layout();
});
</script>
</head>
<body>
<div class="layout">
<div class="center">
Center
<h1><a href="http://www.bramstein.com/projects/jlayout/">jLayout project homepage</a></h1>
</div>
<div class="east">
East
</div>
<div class="west">
West
</div>
<div class="north">
North
</div>
<div class="south">
South
</div>
</div>
</body>
</html>