Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dragging header width #3

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Conversation

dstevick41
Copy link

Attempting to change the width of a column causes the header view to
grow and shrink erratically. After investigating it appears the
event.pageX value used the first time SC.TableHeaderView:mouseDragged()
is called is undefined causing the newWidth calculation to generate
erratic values.

Saved the X position in the mouseDown() function then check the
event.pageX for undefined in mouseDragged(). If undefined use the saved
X position.

Dean Stevick added 3 commits December 10, 2015 12:41
Attempting to change the width of a column causes the header view to
grow and shrink erratically. After investigating it appears the
event.pageX value used the first time SC.TableHeaderView:mouseDragged()
is called is undefined causing the newWidth calculation to generate
erratic values.

Saved the X position in the mouseDown() function then check the
event.pageX for undefined in mouseDragged(). If undefined use the saved
X position.
Add option to control acting on a column select.  Turned off by default
so reordering a column or just changing the width does not cause a sort
action.
Setting to true reverts to selecting a column on each click.
Temporary fix to inconsistent reloading behavior after a column reorder
or width change.  This fix turns off pooling of rows, which is fine for
the default case where the row views are simple divs around plain text.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant