From 2b1f0b65f1f0eee5a5d621e92e7b64142df0734b Mon Sep 17 00:00:00 2001 From: Florrie Date: Sun, 5 Aug 2018 13:10:21 -0300 Subject: (perf) Make sizeProp not a getter --- ui/form/ListScrollForm.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ui') diff --git a/ui/form/ListScrollForm.js b/ui/form/ListScrollForm.js index 77699c2..300fed4 100644 --- a/ui/form/ListScrollForm.js +++ b/ui/form/ListScrollForm.js @@ -39,6 +39,8 @@ module.exports = class ListScrollForm extends Form { // posProp) the next element should be. let nextPos = 0 + this.sizeProp = this.getSizeProp() + for (const item of itemsPastScroll) { item.fixLayout() @@ -160,7 +162,7 @@ module.exports = class ListScrollForm extends Form { .reduce((a, b) => a + b[this.sizeProp], 0) } - get sizeProp() { + getSizeProp() { // The property used to measure the size of an item. If the layoutType // isn't valid (that is, 'horizontal' or 'vertical'), it'll return null. -- cgit 1.3.0-6-gf8a5