range.containsRange was returning result for "intersects"

This commit is contained in:
nightwing 2011-10-18 13:15:04 +05:00
commit 1a462d53de

View file

@ -102,9 +102,12 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
}
}
this.comparePoint = function(p) {
return this.compare(p.row, p.column);
}
this.containsRange = function(range) {
var cmp = this.compareRange(range);
return (cmp == -1 || cmp == 0 || cmp == 1);
return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
}
this.isEnd = function(row, column) {