diff options
author | u9g <git@u9g.dev> | 2022-02-25 21:59:12 -0500 |
---|---|---|
committer | Ali Mohammad Pur <Ali.mpfard@gmail.com> | 2022-02-27 02:48:32 +0330 |
commit | 6c35419236cdba84d4d166db4b5de122af967bd0 (patch) | |
tree | 4f94d83261610e2d1bfade3ee655f421bcb2334c /Base/res | |
parent | 853f7092f8b5ee6b17a5d4672cf9a6d1592c8e5b (diff) | |
download | serenity-6c35419236cdba84d4d166db4b5de122af967bd0.zip |
Spreadsheet: Add Range(s).first() functions
Diffstat (limited to 'Base/res')
-rw-r--r-- | Base/res/js/Spreadsheet/runtime.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Base/res/js/Spreadsheet/runtime.js b/Base/res/js/Spreadsheet/runtime.js index 43a2591364..8b48b2f56f 100644 --- a/Base/res/js/Spreadsheet/runtime.js +++ b/Base/res/js/Spreadsheet/runtime.js @@ -133,6 +133,10 @@ class Ranges { this.ranges = ranges; } + first() { + return this.ranges[0].first(); + } + static from(...ranges) { return new Ranges(ranges); } @@ -178,6 +182,10 @@ class Range { this.normalize(); } + first() { + return new Position(this.startingColumnName, this.startingRow); + } + forEach(callback) { const ranges = []; let startingColumnIndex = thisSheet.column_index(this.startingColumnName); |