From 2efe2adec91e9e9231fb9718686436bc5bfb27b8 Mon Sep 17 00:00:00 2001 From: Quincy Morgan Date: Tue, 12 Feb 2019 15:05:02 -0500 Subject: [PATCH] Restore previous behavior of features hidden and autoHidden but accounting for 0 count features --- modules/renderer/features.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/renderer/features.js b/modules/renderer/features.js index cef453937..6a81755df 100644 --- a/modules/renderer/features.js +++ b/modules/renderer/features.js @@ -95,8 +95,12 @@ export function rendererFeatures(context) { defaultMax: (max || Infinity), enable: function() { this.enabled = true; this.currentMax = this.defaultMax; }, disable: function() { this.enabled = false; this.currentMax = 0; }, - hidden: function() { return !this.enabled || !context.editable() || this.count > this.currentMax * _cullFactor; }, - autoHidden: function() { return this.hidden() && this.enabled; } + hidden: function() { + return !context.editable() || + (this.count === 0 && !this.enabled) || + this.count > this.currentMax * _cullFactor; + }, + autoHidden: function() { return this.hidden() && this.currentMax > 0; } }; }