ColVis.js

ColVis.js

LukeLuke Posts: 4Questions: 0Answers: 0
edited May 2011 in General
[code]
if ( iDivX + iDivWidth > iDocWidth )
{
nHidden.style.left = (iDocWidth-iDivWidth)+"px";
}

// This if-statement does not seem to be functioning right

if ( iDivY + iDivHeight > iDocHeight )
{
nHidden.style.top = (iDivY-iDivHeight-$(this.dom.button).outerHeight())+"px";
}
[/code]

I'm really no JavaScript expert, but this if-statement, at least for me, is not loading right. It causes the pop-up to run off the top of the screen, but behaves like it should once you click out and then click the button again. It seems as though iDivY, iDivHeight or iDocHeight are not displaying correctly on the original load, but I haven't sat down to debug it, but rather just commented out the function completely to get it working correctly.

I'm using FF 4 on Linux and the beta release of DataTables.

Replies

  • allanallan Posts: 63,213Questions: 1Answers: 10,415 Site admin
    Thanks for flagging this up - I've added it to my to-do list to check this out :-)

    Allan
  • fhafha Posts: 4Questions: 0Answers: 0
    edited May 2011
    Hi Allan,

    I can confirm that I have seen this misbehaviour last week in DataTables 1.7.6, too, but it doesn't appear anymore right now. Maybe it appears only with a high amount of columns to be displayed/hidden? (I had more than 30 buttons in the Collection menu, but display only 10 buttons now).

    Regarding this, there seems to be a similar problem with the Option "sAlign": "right", too. On the first display of the Collection list, in FF4 on Mac the list is always left-bound, not right-bound. After the second display it works as expected, though. In IE8 (and IE7 compatibility mode) the display is always as configured (right-bound).

    Regards,
    fha
This discussion has been closed.