From 334fda7c0deadc1566c8af1ade5150fbf5dafc6f Mon Sep 17 00:00:00 2001 From: jean-emmanuel Date: Thu, 20 Jan 2022 19:31:28 +0100 Subject: [PATCH] widget manager: keeping a list of scrolling widgets is useless now --- src/client/managers/widgets.js | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/src/client/managers/widgets.js b/src/client/managers/widgets.js index 9bd33338..d437223d 100644 --- a/src/client/managers/widgets.js +++ b/src/client/managers/widgets.js @@ -17,8 +17,6 @@ class WidgetManager extends EventEmitter { this.linkIdLock = [] this.linkIdLockDepth = 0 - this.scrollingWidgets = [] - this.preArgsSeparator = '||||' this.on('change', this.onChange.bind(this)) @@ -102,9 +100,7 @@ class WidgetManager extends EventEmitter { var hash = widget.hash, address = this.createAddressRef(widget), id = widget.getProp('id'), - linkId = widget.getProp('linkId'), - scroll = widget.getProp('scroll') - + linkId = widget.getProp('linkId') this.widgets[hash] = widget @@ -127,10 +123,6 @@ class WidgetManager extends EventEmitter { } } - if (scroll) { - this.scrollingWidgets.push(hash) - } - this.registerWidget(widget) } @@ -165,8 +157,7 @@ class WidgetManager extends EventEmitter { var hash = widget.hash, address = this.createAddressRef(widget), linkId = widget.getProp('linkId'), - id = widget.getProp('id'), - scroll = widget.getProp('scroll') + id = widget.getProp('id') if (this.widgets[hash]) { if (this.widgets[hash].onRemove) this.widgets[hash].onRemove() @@ -182,7 +173,6 @@ class WidgetManager extends EventEmitter { } if (id && this.idRoute[id].indexOf(hash) != -1) this.idRoute[id].splice(this.idRoute[id].indexOf(hash), 1) if (address && this.addressRoute[address].indexOf(hash) != -1) this.addressRoute[address].splice(this.addressRoute[address].indexOf(hash), 1) - if (scroll && this.scrollingWidgets.indexOf(hash) != -1) this.scrollingWidgets.splice(this.scrollingWidgets.indexOf(hash), 1) if (!Array.isArray(linkId)) linkId = [linkId] linkId = linkId.map(x=>String(x)) @@ -225,12 +215,6 @@ class WidgetManager extends EventEmitter { } } - for (let i in this.scrollingWidgets) { - if (!this.widgets[this.scrollingWidgets[i]]) { - this.scrollingWidgets.splice(i, 1) - } - } - } reset() {