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

scrolling one side before changes are computed #20

Open
jgrocha opened this issue Feb 13, 2015 · 2 comments
Open

scrolling one side before changes are computed #20

jgrocha opened this issue Feb 13, 2015 · 2 comments

Comments

@jgrocha
Copy link

jgrocha commented Feb 13, 2015

Hi,

Thanks for this great tool.
I'm loading one side and I disable the difference calculation. I only enable the difference calculation after loading the second text, because it does not make sense to show the difference between a text and an empty one.
There is only a small problem, because if the user tries to scroll down the first text, before loading the second one, there is a Javascript error.

I fixed it (just a hack), in _scrolling, by adding:

if (!this.hasOwnProperty('changes')) return;

before the cycle where the property changes is used.

If this hack makes sense, I can submit a pull request.

@wickedest
Copy link
Owner

Hi Jorge,

Glad you like Mergely. Have you tried disabling autoupdate
http://www.mergely.com/doc#autoupdate? It should disable the difference
calculation.

Jamie

On 13 February 2015 at 00:31, Jorge Gustavo Rocha [email protected]
wrote:

Hi,

Thanks for this great tool.
I'm loading one side and I disable the difference calculation. I only
enable the difference calculation after loading the second text, because it
does not make sense to show the difference between a text and an empty one.
There is only a small problem, because if the user tries to scroll down
the first text, before loading the second one, there is a Javascript error.

I fixed it (just a hack), in _scrolling, by adding:

if (!this.hasOwnProperty('changes')) return;

before the cycle where the property changes is used.

If this hack makes sense, I can submit a pull request.


Reply to this email directly or view it on GitHub
#20.

@jgrocha
Copy link
Author

jgrocha commented Feb 15, 2015

Hi Jamie,

Yes, I disabled the difference calculation, but was not enough. To disable the difference calculation, I had to do:

$(idsec).mergely('options', {autoupdate: false, change_timeout: 3600000});

After loading the rhs text, to enable back the difference calculation, I revert the settings:

$(idsec).mergely('options', {autoupdate: true, change_timeout: 150});

Regards!

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

No branches or pull requests

2 participants