From 955197e2505e41ea419da0207d74a419c01d6ee4 Mon Sep 17 00:00:00 2001 From: jgould Date: Wed, 13 Apr 2016 13:58:15 -0400 Subject: [PATCH] renamed variables --- src/ui/abstract_color_supplier.js | 16 ++++++++-------- src/ui/heat_map_color_scheme.js | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/ui/abstract_color_supplier.js b/src/ui/abstract_color_supplier.js index 046e318..fea8712 100644 --- a/src/ui/abstract_color_supplier.js +++ b/src/ui/abstract_color_supplier.js @@ -7,8 +7,8 @@ morpheus.AbstractColorSupplier = function() { this.missingColor = '#c0c0c0'; this.scalingMode = morpheus.HeatMapColorScheme.ScalingMode.RELATIVE; this.stepped = false; - this._sizer = new morpheus.HeatMapSizer(); - this._conditions = new morpheus.HeatMapConditions(); + this.sizer = new morpheus.HeatMapSizer(); + this.conditions = new morpheus.HeatMapConditions(); }; morpheus.AbstractColorSupplier.fromJson = function(json) { var cs = json.stepped ? new morpheus.SteppedColorSupplier() @@ -30,10 +30,10 @@ morpheus.AbstractColorSupplier.fromJson = function(json) { morpheus.AbstractColorSupplier.prototype = { discrete : false, getSizer : function() { - return this._sizer; + return this.sizer; }, getConditions : function() { - return this._conditions; + return this.conditions; }, isDiscrete : function() { return this.discrete; @@ -54,11 +54,11 @@ morpheus.AbstractColorSupplier.prototype = { if (this.names != null) { c.names = this.names.slice(0); } - if (this._sizer) { - c._sizer = this._sizer.copy(); + if (this.sizer) { + c.sizer = this.sizer.copy(); } - if (this._conditions) { - c._conditions = this._conditions.copy(); + if (this.conditions) { + c.conditions = this.conditions.copy(); } c.scalingMode = this.scalingMode; c.min = this.min; diff --git a/src/ui/heat_map_color_scheme.js b/src/ui/heat_map_color_scheme.js index 4211f75..c4302c0 100644 --- a/src/ui/heat_map_color_scheme.js +++ b/src/ui/heat_map_color_scheme.js @@ -427,8 +427,8 @@ morpheus.HeatMapColorScheme.prototype = { var oldColorSupplier = this.currentColorSupplier; var newColorSupplier = stepped ? new morpheus.SteppedColorSupplier() : new morpheus.GradientColorSupplier(); - newColorSupplier._sizer = oldColorSupplier.getSizer(); - newColorSupplier._conditions = oldColorSupplier.getConditions(); + newColorSupplier.sizer = oldColorSupplier.getSizer(); + newColorSupplier.conditions = oldColorSupplier.getConditions(); newColorSupplier.getScalingMode(oldColorSupplier.getScalingMode()); newColorSupplier.setMin(oldColorSupplier.getMin()); newColorSupplier.setMax(oldColorSupplier.getMax()); @@ -449,8 +449,8 @@ morpheus.HeatMapColorScheme.prototype = { _.each(_.keys(this.rowValueToColorSupplier), function(key) { // save each scheme var val = _this.rowValueToColorSupplier[key]; - delete val._sizer; - delete val._conditions; +// delete val.sizer; +// delete val.conditions; json.colorSchemes[key] = val; }); -- GitLab