blob: 96fb618e217c8cfef173996292ae5db8f2525bd7 (
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1" />
<script src="../webcomponentsjs/webcomponents.js"></script>
<script src="bigdata.js"></script>
<link rel="import" href="vaadin-components.html"></link>
</head>
<body vaadin-theme='valo'>
<script>
function waitUntil(check, exec) {
var id = setInterval(function() {
if (r = check()) {
clearInterval(id);
exec(r)
}
}, 100);
}
function waitUntilGridReady(id, exec) {
waitUntil(function() {
var grid = document.getElementById(id);
return grid && grid.dataSource && grid;
}, exec);
}
</script>
<h3>Slider</h3>
<div style='width: 30%'>
<v-slider min='0' max='100' value='45'></v-slider>
</div>
<h3>Progress</h3>
<div style='width: 30%'>
<v-progress value='0.3'></v-progress>
</div>
<script>
myDataProvider = function(index, count) {
return myBigData.slice(index, index + count);
};
</script>
<h3>Grid</h3>
<!-- <v-grid rowCount='{{myBigDataSize}}' dataSource='{{myDataProvider}}' shadow theme='reindeer'> -->
<v-grid rowCount='{{myBigDataSize}}' dataSource='{{myDataProvider}}'>
<table>
<thead>
<tr>
<th>Name</th>
<th>Value</th>
<th>Progress</th>
</tr>
</thead>
</table>
</v-grid>
</body>
</html>
|