mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-27 19:06:15 -04:00
Fix syntax errors
This commit is contained in:
parent
8c96c4c60e
commit
e54d63dbcb
1 changed files with 9 additions and 9 deletions
|
@ -97,7 +97,7 @@ $.Class("Revision2",
|
||||||
for (var granularity in this.granularties) {
|
for (var granularity in this.granularties) {
|
||||||
this.next[granularity] = null;
|
this.next[granularity] = null;
|
||||||
this.previous[granularity] = null;
|
this.previous[granularity] = null;
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
addChangeset: function (target, changset, timedelta) {
|
addChangeset: function (target, changset, timedelta) {
|
||||||
if (this.revnum == target.revnum)
|
if (this.revnum == target.revnum)
|
||||||
|
@ -105,17 +105,17 @@ $.Class("Revision2",
|
||||||
|
|
||||||
var delta_revnum = target.revnum - this.revnum;
|
var delta_revnum = target.revnum - this.revnum;
|
||||||
// select the right edge set:
|
// select the right edge set:
|
||||||
var edge = delta_revnum < 0 ? this.previous ? this.next;
|
var edge = delta_revnum < 0 ? this.previous : this.next;
|
||||||
|
|
||||||
// find the correct granularity and add an edge (changeset) for that granularity
|
// find the correct granularity and add an edge (changeset) for that granularity
|
||||||
for (var granularity in this.granularities){
|
for (var granularity in this.granularities) {
|
||||||
if (Math.abs(delta_revnum) == this.granularities[granularity]) {
|
if (Math.abs(delta_revnum) == this.granularities[granularity]) {
|
||||||
//TODO: should we check whether the edge exists?
|
//TODO: should we check whether the edge exists?
|
||||||
//TODO: modify changeset to store the REVISION, not the revnum.
|
//TODO: modify changeset to store the REVISION, not the revnum.
|
||||||
edge[granularity] = new Changeset(target, timedelta, changeset);
|
edge[granularity] = new Changeset(target, timedelta, changeset);
|
||||||
return edge[granularity];
|
return edge[granularity];
|
||||||
}
|
};
|
||||||
}
|
};
|
||||||
// our delta_revnum isn't one of the granularities. Something is wrong
|
// our delta_revnum isn't one of the granularities. Something is wrong
|
||||||
//TODO: handle this case?
|
//TODO: handle this case?
|
||||||
return null;
|
return null;
|
||||||
|
@ -124,7 +124,7 @@ $.Class("Revision2",
|
||||||
//TODO: currently assuming only forward movements
|
//TODO: currently assuming only forward movements
|
||||||
var path = [];
|
var path = [];
|
||||||
var delta_revnum = target.revnum - this.revnum;
|
var delta_revnum = target.revnum - this.revnum;
|
||||||
var edge = delta_revnum < 0; this.previous : this.next;
|
var edge = delta_revnum < 0 ? this.previous : this.next;
|
||||||
|
|
||||||
var current = this;
|
var current = this;
|
||||||
while (current.lt(target)) {
|
while (current.lt(target)) {
|
||||||
|
@ -139,9 +139,9 @@ $.Class("Revision2",
|
||||||
var e = edge[granularity];
|
var e = edge[granularity];
|
||||||
path.push(e);
|
path.push(e);
|
||||||
current = e.target_revision;
|
current = e.target_revision;
|
||||||
}
|
};
|
||||||
}
|
};
|
||||||
}
|
};
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue