Skip to content

Commit

Permalink
Release 17.1.10
Browse files Browse the repository at this point in the history
  • Loading branch information
viterobk committed Mar 2, 2018
1 parent b49fb92 commit f723cb7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
9 changes: 6 additions & 3 deletions js/viz/gauges/linear_gauge.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,16 +74,19 @@ var dxLinearGauge = dxGauge.inherit({
_setupCodomain: function() {
var that = this,
geometry = that.option('geometry') || {},
vertical = _normalizeEnum(geometry.orientation) === 'vertical';
vertical = _normalizeEnum(geometry.orientation) === 'vertical',
initialStartCoord = -100,
initialEndCoord = 100;

that._area = {
vertical: vertical,
x: 0,
y: 0,
startCoord: -100,
endCoord: 100
startCoord: initialStartCoord,
endCoord: initialEndCoord
};
that._rangeContainer.vertical = vertical;
that._translator.setCodomain(initialStartCoord, initialEndCoord);
},

_getScaleLayoutValue: function() {
Expand Down
16 changes: 16 additions & 0 deletions testing/tests/DevExpress.viz.gauges/linearGauge.tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,22 @@ var TestPointerElement = TestElement.inherit({
assert.equal(axisModule.Axis.getCall(0).returnValue.updateOptions.getCall(1).args[0].label.indentFromAxis, -45, "indent");
});

QUnit.test("Pass correct base value into indicator", function(assert) {
var gauge = new dxLinearGauge(this.container, {
scale: {
startValue: -1000,
endValue: 1000
},
valueIndicator: {
type: "rangebar",
baseValue: 0
},
value: 50,
});

assert.strictEqual(gauge._valueIndicator.options.baseValue, 0);
});

QUnit.module("HorizontalGauge - positioning of elements", environment);

QUnit.test("Default", function(assert) {
Expand Down

0 comments on commit f723cb7

Please sign in to comment.