From b2d69d52aa3095d1d937d30f8684ed6808c9a64f Mon Sep 17 00:00:00 2001 From: David Randolph Phillips Date: Thu, 31 Oct 2024 15:36:21 -0400 Subject: [PATCH] [BI-2364] should not set units to value in the setScaleClass() method --- src/components/trait/forms/BaseTraitForm.vue | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/components/trait/forms/BaseTraitForm.vue b/src/components/trait/forms/BaseTraitForm.vue index 93014318f..fbc45ba75 100644 --- a/src/components/trait/forms/BaseTraitForm.vue +++ b/src/components/trait/forms/BaseTraitForm.vue @@ -494,7 +494,6 @@ export default class BaseTraitForm extends Vue { } this.trait.scale.dataType = value; - this.trait!.scale!.units = value; } else if (Scale.dataTypeEquals(value, DataType.Ordinal) && Scale.dataTypeEquals(this.lastCategoryType, DataType.Nominal)) { //Nominal to Ordinal @@ -512,28 +511,17 @@ export default class BaseTraitForm extends Vue { this.restoreMinCategories(2); } this.trait.scale.dataType = value; - this.trait!.scale!.units = value; //Scale history } else if (this.scaleHistory[value.toLowerCase()]) { this.trait.scale = this.scaleHistory[value.toLowerCase()]; this.trait.scale.dataType = value; - if (!Scale.dataTypeEquals(value, DataType.Numerical)) { - this.trait!.scale!.units = value; - } } else { // No history this.trait.scale = new Scale(); this.trait.scale.dataType = value; - // Allow for units in the numerical and duration traits - if (Scale.dataTypeEquals(value, DataType.Numerical)) { - this.trait!.scale!.units = undefined; - } else { - this.trait!.scale!.units = value; - } - //Establish minimal categories for ordinal and nominal if (Scale.dataTypeEquals(value, DataType.Nominal) || Scale.dataTypeEquals(value, DataType.Ordinal)) { this.trait.scale.categories = this.prepopulateCategories();