Skip to content

Commit 037ce4e

Browse files
committed
spec/page-view: [Proposals]
1 parent 41885bc commit 037ce4e

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

spec/page-view.txt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,9 @@ To achieve that, pages and paged viewer need exposure in styles and OM
104104

105105
**Example**
106106

107-
"paged-x" layout adds overflow pages along X axis. Custom page UI needs to scroll to the appropriate position to show each page
107+
"paged-x" layout adds overflow pages along X axis. Custom page UI controls which page is displayed in pagination control
108108
<code>
109-
.pager { overflow:hidden; }
110-
.pages { overflow:paged-x; }
109+
.pager { overflow:paged-x; }
111110
<div class="pageview">
112111
<div class="toolbar">
113112
<button onclick="prevPage()">previous</button>
@@ -120,9 +119,8 @@ To achieve that, pages and paged viewer need exposure in styles and OM
120119
</div>
121120
<script>
122121
function nextPage() {
123-
var nextPageX = pager.scrollLeft + pager.offsetWidth;
124-
if (nextPageX < pager.scrollWidth) {
125-
pager.scrollLeft = nextPageX;
122+
if (pager.currentPage < pager.pageCount) {
123+
pager.currentPage++;
126124
}
127125
}
128126
</script>

0 commit comments

Comments
 (0)