Skip to content

Commit

Permalink
Now mouse over will highlight, but will not scroll the other window.
Browse files Browse the repository at this point in the history
  • Loading branch information
yinwang0 committed Jul 22, 2011
1 parent b44f118 commit 17b0daf
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
7 changes: 5 additions & 2 deletions README
Expand Up @@ -3,8 +3,11 @@
yDiff is implemented in Scheme. The Scheme implementation I'm using is Racket. yDiff is implemented in Scheme. The Scheme implementation I'm using is Racket.
You can find it from http://racket-lang.org. You can find it from http://racket-lang.org.


yDiff supports multiple languages but currently it is not cleanly modularized yDiff supports multiple languages but currently it is not
for different languages, and there is no Unix command line interface. In order cleanly modularized for different languages. There are
global parameters, which I should remove later.

There is no Unix command line interface. In order
to use it, you need to load the 'diff-<lang>.ss' files in the Racket repl before to use it, you need to load the 'diff-<lang>.ss' files in the Racket repl before
invoking the diff-<lang> functions. For example: invoking the diff-<lang> functions. For example:


Expand Down
16 changes: 13 additions & 3 deletions nav-div.js
Expand Up @@ -201,7 +201,7 @@ function clearHighlight() {
* Highlight the link, target nodes and their lines, * Highlight the link, target nodes and their lines,
* then start animation to move the other window to match. * then start animation to move the other window to match.
*/ */
function highlight(me, linkId, targetId, linkLineId, targetLineId) function highlight(me, linkId, targetId, linkLineId, targetLineId, doMatch)
{ {
if (me.id === 'left') { if (me.id === 'left') {
matchId1 = linkId; matchId1 = linkId;
Expand All @@ -218,7 +218,9 @@ function highlight(me, linkId, targetId, linkLineId, targetLineId)
putHighlight(linkLineId, lineHLColor); putHighlight(linkLineId, lineHLColor);
putHighlight(targetLineId, lineHLColor); putHighlight(targetLineId, lineHLColor);


matchWindow(linkId, targetId, nSteps); if (doMatch) {
matchWindow(linkId, targetId, nSteps);
}
} }




Expand Down Expand Up @@ -257,7 +259,15 @@ window.onload =
var lid = t.id var lid = t.id
var tid = t.getAttribute('tid') var tid = t.getAttribute('tid')
var container = getContainer(t) var container = getContainer(t)
highlight(container, lid, tid, 'ignore', 'ignore') highlight(container, lid, tid, 'ignore', 'ignore', false)
}
tags[i].onclick =
function (e) {
var t = getTarget(e)
var lid = t.id
var tid = t.getAttribute('tid')
var container = getContainer(t)
highlight(container, lid, tid, 'ignore', 'ignore', true)
} }
} }


Expand Down

0 comments on commit 17b0daf

Please sign in to comment.