From d26b72bede09774010f50aabcdf63d43d0f25db6 Mon Sep 17 00:00:00 2001 From: Antoine2711 Date: Fri, 17 Apr 2020 04:39:41 -0400 Subject: [PATCH] Use this._minimizeState instead of this._config.minimize Use this._minimizeState instead of this._config.minimize to keep track of the minimized state of the facet --- main/webapp/modules/core/scripts/facets/list-facet.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/main/webapp/modules/core/scripts/facets/list-facet.js b/main/webapp/modules/core/scripts/facets/list-facet.js index 0639ee7bb..6147b5083 100644 --- a/main/webapp/modules/core/scripts/facets/list-facet.js +++ b/main/webapp/modules/core/scripts/facets/list-facet.js @@ -38,7 +38,7 @@ function ListFacet(div, config, options, selection) { this._config.invert = false; } - this._config.minimize = false; + this._minimizeState = false; this._options = options || {}; if (!("sort" in this._options)) { @@ -84,7 +84,6 @@ ListFacet.prototype.getJSON = function() { var o = { type: "list", name: this._config.name, - minimize: this._config.minimize, columnName: this._config.columnName, expression: this._config.expression, omitBlank: "omitBlank" in this._config ? this._config.omitBlank : false, @@ -684,14 +683,13 @@ ListFacet.prototype._remove = function() { }; ListFacet.prototype._minimize = function() { - if(!this._config.minimize) { + if(!this._minimizeState) { this._div.addClass("facet-state-minimize"); - this._config.minimize = true; - } else { this._div.removeClass("facet-state-minimize"); - this._config.minimize = false; } + + this._minimizeState = !this._minimizeState; }; ListFacet.prototype._updateRest = function() {