diff --git a/src/ui/SoliditySlider.js b/src/ui/SoliditySlider.js index d411e80c7b..cc9dd54cc7 100644 --- a/src/ui/SoliditySlider.js +++ b/src/ui/SoliditySlider.js @@ -3,12 +3,18 @@ var Slider = require('./Slider') var utils = require('../helpers/util.js') class SoliditySlider extends Slider { - constructor (_traceManager, reducedTraceBySourceLocation) { + constructor (_traceManager) { super(_traceManager) - this.reducedTraceBySourceLocation = reducedTraceBySourceLocation + this.reducedTraceBySourceLocation } - setValue (value) { - super.setValue(utils.findLowerBoundValue(value, this.reducedTraceBySourceLocation)) + setValue (_value) { + if (this.reducedTraceBySourceLocation) { + super.setValue(utils.findLowerBound(_value, this.reducedTraceBySourceLocation)) + } + } + setReducedTrace (_reducedTraceBySourceLocation) { + super.init(_reducedTraceBySourceLocation.length) + this.reducedTraceBySourceLocation = _reducedTraceBySourceLocation } }