Skip to content

Commit

Permalink
Remove unused methods getNodeAt and timestampToIndex.
Browse files Browse the repository at this point in the history
  • Loading branch information
jorendorff committed Apr 10, 2016
1 parent 001f6c3 commit 7b0e8be
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions lib/rga.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,34 +156,6 @@ RGA.prototype = {
return s;
},

// Get the node immediately to the left of the given cursor location.
// If line == 0 and column == 0, this returns this.left.
getNodeAt: function (line, column) {
var l = 0, c = 0;
var node = this.left;
while (node && (l < line || (l === line && c < column))) {
node = node.next;
if (!node.removed) {
if (node.atom ==="\n") {
l++;
c = 0;
} else {
c++;
}
}
}
return node;
},

timestampToIndex: function (t) {
var offset = -1;
for (var node = this.left; node.timestamp !== t; node = node.next) {
if (!node.removed)
offset++;
}
return offset;
},

_log: function () {
if (RGA._logging)
console.log.apply(console, arguments);
Expand Down

0 comments on commit 7b0e8be

Please sign in to comment.