<div dir="ltr">Hi Jamie<div><br></div><div>It does make sense and it works with a small amount of code :)</div><div><br></div><div>I see that line 1 is always shown with some characters of previous line from the first unchanged code block, even if I start collapsing from line:0.<br>Probably I stumble upon a fix later...<br></div><div><br></div><div>Now the fancy drawings in the middle are not aligned to the changes.<br>It seems I have to adjust the changes' y-coordinates (lhs-y-start, lhs-y-end, etc.) which is a harder challenge without having the knowledge of the 'equal' lines.</div><div><br></div><div>Also a line, or better the disappeared line numbers could be shown (like in a diff view: -6,7 +6,6</div><div>As an extra, a nice feature would be to uncollapse the whole code simply by clicking on a button between the collapsed code.</div><div>That would acquire some more in depth of the code but it's certainly worth a try.</div><div><br></div><div>In the end, I'll add the collapsed mode as a new option for Mergely and update the readme.</div><div><br></div><div>Kind regards</div><div>Sam</div><div><br>On Tuesday, April 21, 2015 at 5:04:23 PM UTC+2, Jamie Peabody wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir="ltr"><div><div><div>Hi Sam,<br><br></div>I haven't done any work on this.<br><br>It is not function that returns "equals".  The unchanged lines would be the inverse of the changed lines.  My gut-feeling approach would be to extend this loop at <a href="https://github.com/wickedest/Mergely/blob/master/lib/mergely.js#L1195" target="_blank" rel="nofollow" onmousedown="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Fwickedest%2FMergely%2Fblob%2Fmaster%2Flib%2Fmergely.js%23L1195\46sa\75D\46sntz\0751\46usg\75AFQjCNHNpjLBXBd1DyUfasIEcXdjSMo9Mg';return true;" onclick="this.href='https://www.google.com/url?q\75https%3A%2F%2Fgithub.com%2Fwickedest%2FMergely%2Fblob%2Fmaster%2Flib%2Fmergely.js%23L1195\46sa\75D\46sntz\0751\46usg\75AFQjCNHNpjLBXBd1DyUfasIEcXdjSMo9Mg';return true;">1195</a> to also add "equal" changes (the opposite of changed).  E.g. if I had a doc with 100 lines, and deleted one line at 50, then my list of changes would be the lhr and rhs changes, plus marking text inverse the change:<br><br>marktext.push([led, {line:0, ch:0}, {line:49, ch:to_ln.text.length}, {<code><strong>collapsed</strong></code>: true}]);<br>marktext.push([led, {line:51, ch:0}, {line:99, ch:to_ln.text.length}, {<code><strong>collapsed</strong></code>: true}]);<br><br></div>Make sense?  It's worth a go, even just to see if it's the right strategy.<br><br></div>Jamie<br></div><div><br><div class="gmail_quote">On 21 April 2015 at 12:58,  <span dir="ltr"><<a href="javascript:" target="_blank" gdf-obfuscated-mailto="2wE0oSLhQVEJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">sam.j...@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello again Jamie<br>
<br>
Thank you for the info you provided so far.<br>
About the non-changes; I see they are not yet available in the code, do you know in which function to get them the best? I assume this function should return something like: [changes, equals].<br>
<br>
Thanks,<br>
Sam<br>
<span>On Thursday, February 12, 2015 at 10:21:46 PM UTC+1, Jamie Peabody wrote:<br>
> Yes, markText is probably the right way to do it.<br>
><br>
><br>
> Around 1195, it iterates through the list of changes and builds an array of marktext.  That marktext is used on line 1251 and 1259 to apply markup.<br>
><br>
><br>
> I think the right way to do it would be to something similar for non-changes.  E.g., if line 6-10 changed, then non-changes would be 1-5 and 11+.<br>
><br>
><br>
> Anyhow, it's a good start.<br>
<br>
</span><div><div>--<br>
You received this message because you are subscribed to the Google Groups "Mergely" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="2wE0oSLhQVEJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">mergely+u...@<wbr>googlegroups.com</a>.<br>
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">https://groups.google.com/d/<wbr>optout</a>.<br>
</div></div></blockquote></div><br></div>
</blockquote></div></div>