/
testresizer.html
216 lines (193 loc) · 7.5 KB
/
testresizer.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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Test Resizer</title>
<script src="https://code.jquery.com/jquery-3.4.0.js"></script>
<script src="oyoresizer.js"></script>
<style>
* {
box-sizing : border-box;
}
::-webkit-scrollbar {
height : 10px;
width : 10px;
}
::-webkit-scrollbar-thumb {
background : white;
border : 2px solid black;
border-radius : 4px;
}
::-webkit-scrollbar-thumb:vertical {
border-right : 1px solid black;
}
::-webkit-scrollbar-thumb:horizontal {
border-bottom : 1px solid black;
}
#frameresizer {
width: 638px;
height: 400px;
border: 10px solid green;
border-left: 15px solid green;
border-right: 125px solid green;
margin-left: 0px;
padding: 0px;
}
.resizable {
height: 250px;
border: 10px solid black;
overflow-x: hidden;
overflow-y: auto;
margin: 8px;
padding-left: 4px;
padding-right: 16px;
}
#resizable1 {
width: 300px;
margin-left: 50px;
}
#resizable2 {
width: 750px;
height: 100px;
margin-left: 0px;
border-left: 10px solid red;
border-right: 30px solid red;
}
.divchild {
border: 1px solid red;
margin-left: 50px;
overflow: hidden;
}
#buiten, #binnen {
border: 10px solid black;
}
#buiten {
width: 300px;
height: 204px;
position: fixed;
left: 824px;
top: 288px;
overflow: hidden;
}
#binnen {
width: 200px;
height:100px;
padding: 30px;
border: 10px solid red;
margin: 10px;
}
img {
width: 130px;
border: 2px solid black;
position: relative;
left: 80px;
}
.container{
display: flex;
flex-direction: row;
}
#frame1, #frame2 {
width: 400px;
height: 300px;
border: 0px solid green;
margin: 0px;
padding: 0px;
overflow: hidden;
margin-right: 16px;
margin-bottom: 16px;
}
#frame1 {
border: 0px solid black;
padding-right: 10px;
}
.oyowrapper1 {
border: 10px solid red;
border-right: 30px solid green;
order: 0;
}
.oyowrapper2 {
order: 1;
}
.oyowrapper1, .oyowrapper2 {
display: inline-block;
vertical-align: middle;
}
button {
height: 30px;
border: 2px solid black;
font-weight: bold;
order: 2;
z-index: 1;
}
</style>
</head>
<body>
<script>
$(document).ready(function () {
$("#frameresizer").attr("src", "frameresizers.html");
//var frameResizer = new oyoresizer("#frameresizer", 200, 1000);
//frameResizer.resizeMargin = 30;
var parentdiv = $("#resizable1");
for (i = 0; i < 30; i++) {
var div = document.createElement("div");
$(div).html("Ipsem solorem.");
$(parentdiv).append(div);
}
var resizables = new oyoresizer(".resizable");
resizables.setSize(200, 800);
var resizable1 = new oyoresizer("#resizable1");
resizable1.setSize(350, 700);
resizable1.resizeMargin = 10;
var resizable2 = new oyoresizer("#resizable2");
resizable2.setSize(200, 800);
var buiten = new oyoresizer("#buiten");
buiten.setSize(240, 500);
var binnen = new oyoresizer("#binnen");
binnen.setSize(140, 300);
$("img").attr("draggable", false);
var img = new oyoresizer("img", 65, 130);
$("#frame1").contents().find("head").append("<style></style>");
$("#frame1").contents().find("style").append("*{box-sizing:border-box}");
$("#frame1").contents().find("style").append("body{margin:0px;padding:0px}");
$("#frame1").contents().find("style").append("#wrapper{height:100%;overflow:scroll;border:0px solid black}");
$("#frame1").contents().find("style").append("::-webkit-scrollbar {height:10px;width:10px}");
$("#frame1").contents().find("style").append("::-webkit-scrollbar-thumb {background:white;border:2px solid black;border-radius:4px}");
$("#frame1").contents().find("body").append("<div style='height:500px;width:540px;padding:4px'>This is a test.</div>");
$("#frame2").attr("src", "https://www.youtube.com/embed/6-26JWceHJw");
var frameresizer1 = new oyoresizer("#frame1");
frameresizer1.setSize(200, 600);
var frameresizer2 = new oyoresizer("#frame2");
frameresizer2.setSize(200, 600);
frameresizer2.resizeMargin = 25;
$("button").click(function () {
var order = $(".oyowrapper1").css("order");
if (order === "0") {
$(".oyowrapper1").css("order", "1");
$(".oyowrapper2").css("order", "0");
} else {
$(".oyowrapper1").css("order", "0");
$(".oyowrapper2").css("order", "1");
}
});
});
</script>
<iframe id="frameresizer"></iframe>
<div id="resizable1" class="resizable">
<div class="divchild"><div>Ipsem solorem dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</div></div>
</div>
<div id="resizable2" class="resizable">
<div class="divchild">Ipsem solorem.</div>
</div>
<div id="buiten">
<div id="binnen">
<div>Ipsem solorem.</div>
</div>
<img src="oyosoftware.png" alt="oYoSoftware"/>
</div>
<div class="container">
<iframe id="frame1"></iframe>
<iframe id="frame2"></iframe>
<button>Flip</button>
</div>
</body>
</html>