Range.Basic: unexport

This commit is contained in:
Peter Fajdiga
2024-10-27 23:31:31 +01:00
parent 78ab48ee09
commit 88f170f5c1
2 changed files with 6 additions and 2 deletions

View File

@@ -101,7 +101,7 @@ class Desktop {
}
private getVisibleRange(scrollX: number) {
return new Range.Basic(scrollX, this.tilingArea.width);
return Range.create(scrollX, this.tilingArea.width);
}
public getCurrentVisibleRange() {

View File

@@ -5,7 +5,7 @@ type Range = {
};
namespace Range {
export class Basic {
class Basic {
constructor(
private readonly x: number,
private readonly width: number,
@@ -24,6 +24,10 @@ namespace Range {
}
}
export function create(x: number, width: number) {
return new Basic(x, width);
}
export function fromRanges(leftRange: Range, rightRange: Range) {
const left = leftRange.getLeft();
const right = rightRange.getRight();