fix freemem bug from stacks refactor

This commit is contained in:
Stewart Allen 2020-12-05 19:50:54 -05:00
commit 505fda6b2a
2 changed files with 9 additions and 4 deletions

View file

@ -5,12 +5,12 @@
(function() {
class Stack {
constructor(view) {
constructor(view, freeMem) {
this._view = view;
this.view = view.newGroup();
this.slices = [];
this.meshes = [];
this.freeMem = true;
this.freeMem = freeMem;
}
size() {
@ -36,6 +36,10 @@
this.view = this.slices = this.meshes = null;
}
setFreeMem(bool) {
this.freeMem = bool;
}
setVisible(newMin, newMax) {
this.show();
for (let i=0, s=this.slices, len=s.length; i<len; i++) {