Restore previous behavior of features hidden and autoHidden but accounting for 0 count features

This commit is contained in:
Quincy Morgan
2019-02-12 15:05:02 -05:00
parent 9007ccb8fd
commit 2efe2adec9
+6 -2
View File
@@ -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; }
};
}