1. #1
    Sencha User lukefowell89's Avatar
    Join Date
    Nov 2010
    Location
    Dorset, UK
    Posts
    262
    Vote Rating
    1
    lukefowell89 is on a distinguished road

      0  

    Default Answered: Scrolling Grid Automatically When Dragging An Element

    Answered: Scrolling Grid Automatically When Dragging An Element


    I have my grid, which is 25 columns by 100 rows. I have built functionality where you can render a chart based on the cell selected in the grid.

    The chart is rendered and placed inside the Grid View, so that when the grid is scrolled manually, the chart stays in the correct place.

    What I need to be able to do, is when I am dragging a chart around (using Ext.dd.DD) which is rendered inside a normal element. I want it to scroll the grid when I reach the edge of the viewport.

    However I have tryed figuring out the elements position, and scrolling accordingly (scrollTo and scrollByDeltaX/Y) but this is very unreliable and jolty. If you try to drag something, the mouse must be moving in order for the scroll to happen, but if you carry on moving the mouse and you reach the edge of the viewport, its just going to get stuck and you have to do some weird mouse wiggle to get it moving again.

    I have also tryed using Ext.dd.ScrollManager, registering my element and hoping that it handles scrolling for me. But this also didnt work.

    Finally I tryed looping the scroll method on a timer event, so that is kept trying to scroll every 0.25 secs while the dragged container was inside the threshold. This also didnt work.

    All I want is that if I drag my chart container to the end of the viewport, it will carry on scrolling until I pull it away, not only move when I have moved the mouse inside the threshold.

    In desperate need for assistance, anyone have any ideas?
    My Web Design, Development & Internet Marketing Blog: http://www.aztec-online.com
    Read My Review of the latest Ext JS Framework:Ext JS 4 Review

  2. Best advice, wait for 4.1 when the virtual scrollbars will be gone. Waste of time to patch the 4.0.x versions...

  3. #2
    Sencha User lukefowell89's Avatar
    Join Date
    Nov 2010
    Location
    Dorset, UK
    Posts
    262
    Vote Rating
    1
    lukefowell89 is on a distinguished road

      0  

    Default


    I have found that the reason it does not scroll when I drag the element down is because the scrollbars are not actually attached to the grid, they are seperate (ext.grid.scroller).

    I made a test app which I added a grid to the document body, the scroll bars that were rendered were the browsers not the grids, therefore when i dragged an element down, the browser controlled the dragging and scrolling correctly.

    However, ExtJS doesnt seem to give any real support to automatic drag scrolling. Is there anyway around this?
    My Web Design, Development & Internet Marketing Blog: http://www.aztec-online.com
    Read My Review of the latest Ext JS Framework:Ext JS 4 Review

  4. #3
    Sencha User lukefowell89's Avatar
    Join Date
    Nov 2010
    Location
    Dorset, UK
    Posts
    262
    Vote Rating
    1
    lukefowell89 is on a distinguished road

      0  

    Default


    Someone must know something that could be of use? At least a help and knowing where to look
    My Web Design, Development & Internet Marketing Blog: http://www.aztec-online.com
    Read My Review of the latest Ext JS Framework:Ext JS 4 Review

  5. #4
    Sencha - Community Support Team mankz's Avatar
    Join Date
    Nov 2007
    Location
    Stockholm, Sweden
    Posts
    2,639
    Answers
    33
    Vote Rating
    104
    mankz is a name known to all mankz is a name known to all mankz is a name known to all mankz is a name known to all mankz is a name known to all mankz is a name known to all

      0  

    Default


    Best advice, wait for 4.1 when the virtual scrollbars will be gone. Waste of time to patch the 4.0.x versions...

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar