package
This commit is contained in:
parent
24eccde63e
commit
11eedc31f9
15 changed files with 2748 additions and 1259 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
|
|
@ -2096,7 +2096,7 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
|
|||
};
|
||||
|
||||
(function() {
|
||||
this.isEequal = function(range) {
|
||||
this.isEqual = function(range) {
|
||||
return this.start.row == range.start.row &&
|
||||
this.end.row == range.end.row &&
|
||||
this.start.column == range.start.column &&
|
||||
|
|
@ -2162,6 +2162,11 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
|
|||
return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
|
||||
}
|
||||
|
||||
this.intersectsRange = function(range) {
|
||||
var cmp = this.compareRange(range);
|
||||
return (cmp == -1 || cmp == 0 || cmp == 1);
|
||||
}
|
||||
|
||||
this.isEnd = function(row, column) {
|
||||
return this.end.row == row && this.end.column == column;
|
||||
}
|
||||
|
|
@ -2321,6 +2326,21 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
|
|||
return Range.fromPoints(start || this.start, end || this.end);
|
||||
};
|
||||
|
||||
this.fixOrientation = function() {
|
||||
if (
|
||||
this.start.row < this.end.row
|
||||
|| (this.start.row == this.end.row && this.start.column < this.end.column)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var temp = this.start;
|
||||
this.end = this.start;
|
||||
this.start = temp;
|
||||
return true;
|
||||
};
|
||||
|
||||
|
||||
this.isEmpty = function() {
|
||||
return (this.start.row == this.end.row && this.start.column == this.end.column);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2070,7 +2070,7 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
|
|||
};
|
||||
|
||||
(function() {
|
||||
this.isEequal = function(range) {
|
||||
this.isEqual = function(range) {
|
||||
return this.start.row == range.start.row &&
|
||||
this.end.row == range.end.row &&
|
||||
this.start.column == range.start.column &&
|
||||
|
|
@ -2136,6 +2136,11 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
|
|||
return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
|
||||
}
|
||||
|
||||
this.intersectsRange = function(range) {
|
||||
var cmp = this.compareRange(range);
|
||||
return (cmp == -1 || cmp == 0 || cmp == 1);
|
||||
}
|
||||
|
||||
this.isEnd = function(row, column) {
|
||||
return this.end.row == row && this.end.column == column;
|
||||
}
|
||||
|
|
@ -2295,6 +2300,21 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
|
|||
return Range.fromPoints(start || this.start, end || this.end);
|
||||
};
|
||||
|
||||
this.fixOrientation = function() {
|
||||
if (
|
||||
this.start.row < this.end.row
|
||||
|| (this.start.row == this.end.row && this.start.column < this.end.column)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var temp = this.start;
|
||||
this.end = this.start;
|
||||
this.start = temp;
|
||||
return true;
|
||||
};
|
||||
|
||||
|
||||
this.isEmpty = function() {
|
||||
return (this.start.row == this.end.row && this.start.column == this.end.column);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2092,7 +2092,7 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
|
|||
};
|
||||
|
||||
(function() {
|
||||
this.isEequal = function(range) {
|
||||
this.isEqual = function(range) {
|
||||
return this.start.row == range.start.row &&
|
||||
this.end.row == range.end.row &&
|
||||
this.start.column == range.start.column &&
|
||||
|
|
@ -2158,6 +2158,11 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
|
|||
return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
|
||||
}
|
||||
|
||||
this.intersectsRange = function(range) {
|
||||
var cmp = this.compareRange(range);
|
||||
return (cmp == -1 || cmp == 0 || cmp == 1);
|
||||
}
|
||||
|
||||
this.isEnd = function(row, column) {
|
||||
return this.end.row == row && this.end.column == column;
|
||||
}
|
||||
|
|
@ -2317,6 +2322,21 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
|
|||
return Range.fromPoints(start || this.start, end || this.end);
|
||||
};
|
||||
|
||||
this.fixOrientation = function() {
|
||||
if (
|
||||
this.start.row < this.end.row
|
||||
|| (this.start.row == this.end.row && this.start.column < this.end.column)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var temp = this.start;
|
||||
this.end = this.start;
|
||||
this.start = temp;
|
||||
return true;
|
||||
};
|
||||
|
||||
|
||||
this.isEmpty = function() {
|
||||
return (this.start.row == this.end.row && this.start.column == this.end.column);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2107,7 +2107,7 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
|
|||
};
|
||||
|
||||
(function() {
|
||||
this.isEequal = function(range) {
|
||||
this.isEqual = function(range) {
|
||||
return this.start.row == range.start.row &&
|
||||
this.end.row == range.end.row &&
|
||||
this.start.column == range.start.column &&
|
||||
|
|
@ -2173,6 +2173,11 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
|
|||
return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
|
||||
}
|
||||
|
||||
this.intersectsRange = function(range) {
|
||||
var cmp = this.compareRange(range);
|
||||
return (cmp == -1 || cmp == 0 || cmp == 1);
|
||||
}
|
||||
|
||||
this.isEnd = function(row, column) {
|
||||
return this.end.row == row && this.end.column == column;
|
||||
}
|
||||
|
|
@ -2332,6 +2337,21 @@ var Range = function(startRow, startColumn, endRow, endColumn) {
|
|||
return Range.fromPoints(start || this.start, end || this.end);
|
||||
};
|
||||
|
||||
this.fixOrientation = function() {
|
||||
if (
|
||||
this.start.row < this.end.row
|
||||
|| (this.start.row == this.end.row && this.start.column < this.end.column)
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var temp = this.start;
|
||||
this.end = this.start;
|
||||
this.start = temp;
|
||||
return true;
|
||||
};
|
||||
|
||||
|
||||
this.isEmpty = function() {
|
||||
return (this.start.row == this.end.row && this.start.column == this.end.column);
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue