Skip to content

Commit

Permalink
Release 17.2.6
Browse files Browse the repository at this point in the history
Cherry-picked changesets:
  86790b3 Ksenia Mordalyuk - Extend list of aliases for 'position' option in dxOverlay (#3111)
  • Loading branch information
viterobk committed Mar 2, 2018
1 parent b06d4fe commit f732ecf
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 11 deletions.
8 changes: 6 additions & 2 deletions js/ui/overlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,11 @@ var OVERLAY_CLASS = "dx-overlay",
"bottom": { my: "bottom center", at: "bottom center" },
"right": { my: "right center", at: "right center" },
"left": { my: "left center", at: "left center" },
"center": { my: 'center', at: 'center' }
"center": { my: 'center', at: 'center' },
"right bottom": { my: 'right bottom', at: 'right bottom' },
"right top": { my: 'right top', at: 'right top' },
"left bottom": { my: 'left bottom', at: 'left bottom' },
"left top": { my: 'left top', at: 'left top' }
};

var realDevice = devices.real(),
Expand Down Expand Up @@ -181,7 +185,7 @@ var Overlay = Widget.inherit({
/**
* @name dxOverlayOptions_position
* @publicName position
* @type string|positionConfig|function
* @type Enums.PositionAlignment|positionConfig|function
* @default { my: 'center', at: 'center', of: window }
*/
position: {
Expand Down
6 changes: 0 additions & 6 deletions js/ui/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,12 +247,6 @@ var Popup = Overlay.inherit({
return device.phone && currentTheme === "win8";
},
options: {
/**
* @name dxPopupOptions_position
* @publicName position
* @type string|positionConfig
* @inheritdoc
*/
position: {
my: "top center",
at: "top center",
Expand Down
9 changes: 6 additions & 3 deletions js/viz/gauges/linear_gauge.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,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 f732ecf

Please sign in to comment.