Skip to content

Conversation

@asvishnyakov
Copy link

@asvishnyakov asvishnyakov commented Mar 15, 2017

Now ui-grid resize occurs a 250 ms after container resize. Because of that, for exampple, I have scroll bar flick when I resize ui-grid container
screenshot 74
If you will use $watch, there will be no delay between container resize and ui-grid resize.

@dlgski
Copy link
Contributor

dlgski commented Mar 16, 2017

I've been wanting to change this for ages, thanks for the PR. Did you not need to update any unit tests???

@derekm
Copy link

derekm commented Mar 16, 2017

Great fix, thanks! This is another one of the performance issues in ui-grid that we've had our eye on!

@asvishnyakov
Copy link
Author

@dlgski Yes, I did not touch tests. I've second commit is just because Travis use strong check of semicolon usage in javascript.

@asvishnyakov
Copy link
Author

Revoked. In some sitations it will not work at all, because angular watch will not call function until you will scroll grid, for example. I think, this issue can't be fixed until browers will not provide API to watch width/height changes on element

@derekm
Copy link

derekm commented Mar 17, 2017

@asvishnyakov -- True... This change would require that height/width only be modified through the two-way bound ui-grid configuration (which would have worked for me!).

@derekm
Copy link

derekm commented Mar 17, 2017

You could monkey patch container elements' setAttribute methods to watch for height/width changes then pass the call on to the original setAttribute that you moved out of the way. This is how lots of features are implemented in GNOME Shell, for example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants