Feature toggle for quantity calculation.

This commit is contained in:
Viktor Kovacs 2021-05-29 09:23:49 +02:00
parent a3d283f613
commit ba41ada99e
2 changed files with 8 additions and 5 deletions

View File

@ -1,4 +1,5 @@
OV.FeatureSet =
{
SetDefaultColor : false
SetDefaultColor : false,
CalculateQuantities : false
};

View File

@ -134,10 +134,12 @@ OV.InfoPanel = class
}
let obj = this;
this.CreateButton (contentDiv, 'Calculate Quantities', function (button) {
obj.popup = OV.ShowQuantitiesPopup (button, info.element);
});
if (OV.FeatureSet.CalculateQuantities) {
this.CreateButton (contentDiv, 'Calculate Quantities', function (button) {
obj.popup = OV.ShowQuantitiesPopup (button, info.element);
});
}
let materialsText = 'Materials (' + materialItems.length + ')';
this.CreateButton (contentDiv, materialsText, function (button) {
obj.popup = OV.ShowListPopup (button, materialItems, {