summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Calviño Sánchez <danxuliu@gmail.com>2018-11-14 15:05:40 +0100
committerDaniel Calviño Sánchez <danxuliu@gmail.com>2018-11-20 12:18:15 +0100
commita76f6d64d0f192cb8e42ae4c912ee461b3c60ba5 (patch)
tree80282657eecd110858fcb96275f079b1f6ae5298
parentcb957fd7abbc8576411b29369621cfca311d9dd7 (diff)
Expose first and last elements through getters
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
-rw-r--r--js/views/virtuallist.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/js/views/virtuallist.js b/js/views/virtuallist.js
index f55fb673f..38207322b 100644
--- a/js/views/virtuallist.js
+++ b/js/views/virtuallist.js
@@ -180,6 +180,22 @@
VirtualList.prototype = {
+ getFirstElement: function() {
+ return this._$firstElement;
+ },
+
+ getFirstVisibleElement: function() {
+ return this._$firstVisibleElement;
+ },
+
+ getLastElement: function() {
+ return this._$lastElement;
+ },
+
+ getLastVisibleElement: function() {
+ return this._$lastVisibleElement;
+ },
+
prependElementStart: function() {
this._prependedElementsBuffer = document.createDocumentFragment();