-
Notifications
You must be signed in to change notification settings - Fork 250
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
Keep scrolling position after editing #335
Comments
Well, is possible to add a listener to keep saving the last x,y position.. and then when the render methods runs again, set this 2 values again on the scroll |
Hi! Yes, I tweaked the .js that way and it works just fine! |
Awesome!! could u please share with us? |
Yup! on this.Draw = function () { I have declared the variables:
after declaring the name of the very first container, but BEFORE creating it: var newId = '#' + this.vDivId + 'gchartbody'; as first thing I save the positions. Please note that the very first time they won't be recorded because the main div does not exist yet, but after the first render I'll have an exising instance of the div to record the position, before the function destroys it and builds it again: CUR_SCROLL_TOP = $(newId).scrollTop(); then at the very end, after : this.drawComplete(vMinDate, vColWidth, bd); I set the previous positions:
|
Hi,
great work guys, I'm using it for very big charts that take lots of space both vertical and horizontal. I made the date cells editable so the user can edit the durations live. The problem is that after editing a value, e.g. very low in the scroll top position, the chart gets rendered again and it pulls back the user to x:0 y:0. Is there a "clean" way to keep the scroll position after changing values?
thanks a lot!
The text was updated successfully, but these errors were encountered: