Change Columns header movement effect on ipad

Change Columns header movement effect on ipad

fbolandfboland Posts: 18Questions: 0Answers: 0
edited December 2013 in DataTables 1.9
Is it possible to change columns header effect movement on ipad ?

My datatable have more columns than is displayable on screen, so i have a scroll on y axes.

When i scroll on right, there is a not terrible small animation to forward columns.

I would like to change this animation.

Is there a callback to override the default animation ?

Wath's the best practice ?

Thx

Replies

  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin
    I don't really understand the question I'm afraid. Are you using FixedHeader, FixedColumns, just the build in scrolling or something else. PLease link to a test case as noted in the forum rules.

    Allan
  • fbolandfboland Posts: 18Questions: 0Answers: 0
    Test case : http://lerelaisimmobilier.com/TestDataTable.php

    If you run it on ipad and move datatable content from left to right, you can see the header columns content move in the same time. When datatable content animation end, the header columns move another once to his final position.

    It's seems the columns header position is recalculated at the end of the data content animation.
  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin
    Could you possible try using DataTables 1.10 pre-beta with this page please: https://github.com/DataTables/DataTables/tree/1_10_wip/media/js . I don't have an iPad available at the moment, so I can't try it myself, but that might be resolved in 1.10.

    Allan
  • fbolandfboland Posts: 18Questions: 0Answers: 0
    I have the same problem with DataTables 1.10 pre-beta version.

    It seems the columns header alignement take effect after the end of the data animation.

    How is doing animation ?
  • fbolandfboland Posts: 18Questions: 0Answers: 0
    I try to debug it and identify the problem code :

    [code]
    /* When the body is scrolled, then we also want to scroll the headers */
    $(nScrollBody).scroll( function (e) {
    nScrollHead.scrollLeft = this.scrollLeft;
    console.log(this.scrollLeft);
    if ( nTfoot !== null )
    {
    nScrollFoot.scrollLeft = this.scrollLeft;
    }
    } );
    [/code]

    On ipad, if scroll is too fast, scroll event is triggered only at the end of the scroll.

    I don't know how to correct it ?
  • fbolandfboland Posts: 18Questions: 0Answers: 0
    I found a solution :

    [code]
    //$(nScrollBody).scroll( function (e) {
    $(nScrollBody).on("scroll touchmove", function (e) {
    [/code]

    Is it possible to change it on futur version ?
  • fbolandfboland Posts: 18Questions: 0Answers: 0
    In the end the problem is only at half corrected.
    There is now no problem during the finger move on ipad.
    However, the problem is still there when you swipe and release your finger and the scroll still in progress for a while.

    Someone have a solution ?
  • allanallan Posts: 63,368Questions: 1Answers: 10,449 Site admin
    I don't actually see any animation on a desktop browser. Is it iPad specific?
  • fbolandfboland Posts: 18Questions: 0Answers: 0
    Yes, the problem is only on ipad.
This discussion has been closed.