-
Notifications
You must be signed in to change notification settings - Fork 107
/
Copy pathfixedRowHeight.html
64 lines (51 loc) · 1.98 KB
/
fixedRowHeight.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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Fixed Row Height</title>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.1/angular.js"></script>
<script src="../../dist/ui-scroll.js"></script>
<script src="fixedRowHeight.js"></script>
<link rel="stylesheet" href="../css/style.css" type="text/css" />
</head>
<body ng-app="application">
<div class="cont cont-global" ng-controller="MainCtrl">
<a class="back" href="../index.html">browse other examples</a>
<h1 class="page-header page-header-exapmle">Fixed Row Height</h1>
<div class="description">
<p>
If the height of all the viewport rows is known and not going to be changed,
it might be passed as "row-height" attribute.
This reduces inner calculations and browser reflows,
which leads to a performance increase.
</p>
</div>
<div class="actions">
<input ng-model="perfSlowCount" size="4" /> performance decrease coefficient (0 - fastest)
</div>
<div class="viewport" ui-scroll-viewport>
<div ui-scroll="item in datasource" buffer-size="10" row-height="25" allow-visibility-watch="false" adapter="adapter">
<div class="item" ng-style="{'height': '25px'}">
{{item.text}}
<span ng-repeat="(key, value) in item.input track by $index">
<input ng-model="value.value" size="2" />
</span>
{{getSum(item)}}
{{getMul(item)}}
{{getText(item)}}
<span ng-repeat="(key, value) in perfSlowCountList track by $index">
<div style="height: 1px; width: 1px; overflow: hidden;">
{{item.text}}
<span ng-repeat="(key, value) in item.input track by $index">
<input ng-model="value.value" size="2" />
</span>
{{getSum(item)}}
{{getMul(item)}}
{{getText(item)}}
</div>
</span>
</div>
</div>
</div>
</body>
</html>