Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: Buffered Store with infinite grid - scrolling issues

    Success! Looks like we've fixed this one. According to our records the fix was applied for a bug in our system in a recent build.
  1. #11
    Sencha User
    Join Date
    Aug 2011
    Location
    india
    Posts
    52
    Vote Rating
    0
      0  

    Default

    d1984 / Animal still waiting for update from your side

  2. #12
    Sencha Premium Member
    Join Date
    Jan 2012
    Location
    Lahore
    Posts
    53
    Vote Rating
    -1
      0  

    Default Any Updates about smooth scrolling

    is this issue officially addressed and resolved, I am using 4.0.7 and facing same scrolling problems, is there any overide provided ? your guide line would be appreciated.

  3. #13
    Sencha User
    Join Date
    Aug 2011
    Location
    india
    Posts
    52
    Vote Rating
    0
      0  

    Default

    d1984 / Animal ,
    still waiting for update from your side

  4. #14
    Sencha User
    Join Date
    Aug 2011
    Location
    india
    Posts
    52
    Vote Rating
    0
      0  

    Default

    d1984 / Animal,
    can you confirm issue with bug fix?

  5. #15
    Sencha Premium Member
    Join Date
    Jan 2012
    Location
    Lahore
    Posts
    53
    Vote Rating
    -1
      0  

    Default

    As far as I know this bug is addressed in 4.1, but to switch to 4.1 from 4.0.7 , I am not sure what other things will stop working.

    Any body who went to 4.1 becuase of this scrolling issue can give idea, and what labour it took to switch from 4.0 to 4.1
    EXT Js Developer

  6. #16
    Sencha User
    Join Date
    Jun 2011
    Location
    Seattle, WA
    Posts
    14
    Vote Rating
    0
      0  

    Question Diff

    Has anyone done a diff with 4.1 to see if we can reverse engineer a patch for 4.0.* builds?

  7. #17
    Sencha User
    Join Date
    Jun 2011
    Location
    Seattle, WA
    Posts
    14
    Vote Rating
    0
      0  

    Thumbs up Fixed!

    d1984's solution worked for me in 4.0.7!

    Code:
    Ext.override(Ext.grid.PagingScroller, {
        onElScroll: function(e, t) {
            var me = this,
                panel = me.getPanel(),
                store = panel.store,
                pageSize = store.pageSize,
                guaranteedStart = store.guaranteedStart,
                guaranteedEnd = store.guaranteedEnd,
                totalCount = store.getTotalCount(),
                numFromEdge = Math.ceil(me.percentageFromEdge * pageSize),
                position = t.scrollTop,
                visibleStart = Math.floor(position / me.rowHeight),
                view = panel.down('tableview'),
                viewEl = view.el,
                visibleHeight = viewEl.getHeight(),
                visibleAhead = Math.ceil(visibleHeight / me.rowHeight),
                visibleEnd = visibleStart + visibleAhead,
                prevPage = Math.floor(visibleStart / pageSize),
                nextPage = Math.floor(visibleEnd / pageSize) + 2,
                lastPage = Math.ceil(totalCount / pageSize),
                snap = me.snapIncrement,
                requestStart = Math.floor(visibleStart / snap) * snap,
                requestEnd = requestStart + pageSize - 1,
                activePrefetch = me.activePrefetch;
    
    
            me.visibleStart = visibleStart;
            me.visibleEnd = visibleEnd;
    
    
            me.syncScroll = true;
            if (totalCount >= pageSize) {
                // end of request was past what the total is, grab from the end back a pageSize
                if (requestEnd > totalCount - 1) {
                    me.cancelLoad();
                    if (store.rangeSatisfied(totalCount - pageSize, totalCount - 1)) {
                        me.syncScroll = true;
                    }
                    store.guaranteeRange(totalCount - pageSize, totalCount - 1);
                // Out of range, need to reset the current data set
                } else if (visibleStart <= guaranteedStart || visibleEnd > guaranteedEnd) {
                    if (visibleStart <= guaranteedStart) {
                        // need to scroll up
                        requestStart -= snap;
                        requestEnd -= snap;
                        
                        if (requestStart < 0) {
                            requestStart = 0;
                            requestEnd = pageSize;
                        }
                    }
                    if (store.rangeSatisfied(requestStart, requestEnd)) {
                        me.cancelLoad();
                        store.guaranteeRange(requestStart, requestEnd);
                    } else {
                        store.mask();
                        me.attemptLoad(requestStart, requestEnd);
                    }
                    //BEGIN FIX
                    //changed this value to true
                    me.syncScroll = true;
                    //END FIX
                } else if (activePrefetch && visibleStart < (guaranteedStart + numFromEdge) && prevPage > 0) {
                    me.syncScroll = true;
                    store.prefetchPage(prevPage);
                } else if (activePrefetch && visibleEnd > (guaranteedEnd - numFromEdge) && nextPage < lastPage) {
                    me.syncScroll = true;
                    store.prefetchPage(nextPage);
                }
            }
    
    
            if (me.syncScroll) {
                me.syncTo();
            }
        }
    });

Page 2 of 2 FirstFirst 12

Similar Threads

  1. [INFOREQ] Buffered Ext.data.Store issues
    By stevil in forum Ext:Bugs
    Replies: 37
    Last Post: 14 Jul 2011, 9:55 AM
  2. Buffered scrolling grid inside panel, no scrolling?
    By stijnster in forum Ext: Discussion
    Replies: 3
    Last Post: 6 May 2011, 4:54 AM
  3. Dynamic store for Infinite Scrolling grid
    By gctram in forum Ext: Discussion
    Replies: 0
    Last Post: 2 May 2011, 9:59 AM
  4. Replies: 0
    Last Post: 31 Mar 2011, 11:17 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •