File tree Expand file tree Collapse file tree
public/javascripts/DV/lib Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ // PageSet is a pseudo-presenter/view which manages and paints
2+ // pages into a viewer's main display.
3+ //
4+ // PageSet creates three page objects, two of which are on screen
5+ // at any one time. The third is then updated off screen when
6+ // the display is scrolled.
7+ //
8+ // PageSet is also manages zooming.
19DV . PageSet = function ( viewer ) {
210 this . currentPage = null ;
311 this . pages = { } ;
@@ -16,18 +24,16 @@ DV.PageSet.prototype.execute = function(action,params){
1624DV . PageSet . prototype . buildPages = function ( options ) {
1725 options = options || { } ;
1826 var pages = this . getPages ( ) ;
19- for ( var i = 0 ; i < pages . length ; i ++ ) {
20- var page = pages [ i ] ;
27+
28+ _ . each ( pages , function ( page ) {
2129 page . set = this ;
22- page . index = i ;
2330
2431 // TODO: Make more explicit, this is sloppy
2532 this . pages [ page . label ] = new DV . Page ( this . viewer , page ) ;
2633
27- if ( page . currentPage == true ) {
28- this . currentPage = this . pages [ page . label ] ;
29- }
30- }
34+ if ( page . currentPage == true ) { this . currentPage = this . pages [ page . label ] ; }
35+ } , this ) ;
36+
3137 this . viewer . models . annotations . renderAnnotations ( ) ;
3238} ;
3339
You can’t perform that action at this time.
0 commit comments