From f732ecf5440b5baf43e8b137a337a3924bed5cb4 Mon Sep 17 00:00:00 2001 From: viterobk Date: Fri, 2 Mar 2018 18:03:04 +0300 Subject: [PATCH] Release 17.2.6 Cherry-picked changesets: 86790b3 Ksenia Mordalyuk - Extend list of aliases for 'position' option in dxOverlay (#3111) --- js/ui/overlay.js | 8 ++++++-- js/ui/popup.js | 6 ------ js/viz/gauges/linear_gauge.js | 9 ++++++--- .../DevExpress.viz.gauges/linearGauge.tests.js | 16 ++++++++++++++++ 4 files changed, 28 insertions(+), 11 deletions(-) diff --git a/js/ui/overlay.js b/js/ui/overlay.js index 2b628b3a7b30..bbbb739daf66 100644 --- a/js/ui/overlay.js +++ b/js/ui/overlay.js @@ -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(), @@ -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: { diff --git a/js/ui/popup.js b/js/ui/popup.js index aa9b1f836d78..d40b64d448a3 100644 --- a/js/ui/popup.js +++ b/js/ui/popup.js @@ -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", diff --git a/js/viz/gauges/linear_gauge.js b/js/viz/gauges/linear_gauge.js index 44829f415aff..ab47b17de662 100644 --- a/js/viz/gauges/linear_gauge.js +++ b/js/viz/gauges/linear_gauge.js @@ -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() { diff --git a/testing/tests/DevExpress.viz.gauges/linearGauge.tests.js b/testing/tests/DevExpress.viz.gauges/linearGauge.tests.js index eca520fad767..f7b116607a0c 100644 --- a/testing/tests/DevExpress.viz.gauges/linearGauge.tests.js +++ b/testing/tests/DevExpress.viz.gauges/linearGauge.tests.js @@ -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) {