aboutsummaryrefslogtreecommitdiffstats
path: root/tests/visual/compound/draggable_resizable.html
blob: 539091b7f4ac0bf4df85a68824198c0691f28f33 (plain)
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
<!doctype html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<title>Compound Visual Test: Draggable and Resizable block element</title>
	<link rel="stylesheet" href="../visual.css">
	<link rel="stylesheet" href="../../../themes/base/all.css">
	<style>
	.draggable {
		margin: 0.5em;
		padding: 0.5em;
	}
	.absolute {
		color: red;
		position: absolute !important;
	}
	</style>
	<script src="../../../external/requirejs/require.js"></script>
	<script src="../../../demos/bootstrap.js" data-modules="draggable resizable"
		data-composite="true">
		$( ".draggable" )
			.addClass( "ui-widget ui-widget-header ui-corner-all" )
			.draggable({
				revert: "invalid"
			})
			.resizable({
				minHeight: 13,
				handles: "s"
			});
		$( ".draggable:last" ).addClass( "absolute" );
	</script>
</head>
<body>

<p>WHAT: Three draggable and resizable elements, with only a bottom handle. Last one (red color) is absolutely positioned.</p>
<p>EXPECTED: Each element can be dragged and resized. The first two stay with their relative positioning (induced by draggable). The last one can be resized despite the absolute positioning.</p>

<div id="first">
	<div class="draggable">Draggable 1-1</div>
	<div class="draggable">Draggable 1-2</div>
	<div class="draggable">Draggable 1-3</div>
</div>

</body>
</html>