@sapui5/sap.suite.ui.commons 1.151.0 → 1.152.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/sap/suite/ui/commons/.library +1 -1
- package/src/sap/suite/ui/commons/AriaProperties.js +1 -1
- package/src/sap/suite/ui/commons/CalculationBuilder.js +1 -1
- package/src/sap/suite/ui/commons/CalculationBuilderExpression.js +1 -1
- package/src/sap/suite/ui/commons/CalculationBuilderFunction.js +1 -1
- package/src/sap/suite/ui/commons/CalculationBuilderGroup.js +1 -1
- package/src/sap/suite/ui/commons/CalculationBuilderItem.js +1 -1
- package/src/sap/suite/ui/commons/CalculationBuilderValidationResult.js +1 -1
- package/src/sap/suite/ui/commons/CalculationBuilderVariable.js +1 -1
- package/src/sap/suite/ui/commons/CloudFilePicker.js +1 -1
- package/src/sap/suite/ui/commons/MicroProcessFlow.js +1 -1
- package/src/sap/suite/ui/commons/MicroProcessFlowItem.js +1 -1
- package/src/sap/suite/ui/commons/TimelineNavigator.js +12 -9
- package/src/sap/suite/ui/commons/collaboration/UniversalCollaborationBar.js +475 -361
- package/src/sap/suite/ui/commons/flexibility/changeHandler/PropertyChangeMapper.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/CropCustomShapeHistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/CropEllipseHistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/CropRectangleHistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/CustomSizeItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/FilterHistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/FlipHistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/HistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/ImageEditor.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/ImageEditorContainer.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/ImageEditorResponsiveContainer.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/ResizeHistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/imageeditor/RotateHistoryItem.js +1 -1
- package/src/sap/suite/ui/commons/library.js +1 -1
- package/src/sap/suite/ui/commons/messagebundle_mk.properties +1 -1
- package/src/sap/suite/ui/commons/networkgraph/ElementBase.js +7 -2
- package/src/sap/suite/ui/commons/networkgraph/Graph.js +9 -4
- package/src/sap/suite/ui/commons/networkgraph/Group.js +1 -1
- package/src/sap/suite/ui/commons/networkgraph/Line.js +11 -0
- package/src/sap/suite/ui/commons/networkgraph/Node.js +1 -1
- package/src/sap/suite/ui/commons/networkgraph/Tooltip.js +3 -1
- package/src/sap/suite/ui/commons/networkgraph/util/ConnectionPathUtils.js +14 -66
- package/src/sap/suite/ui/commons/statusindicator/Circle.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/CustomShape.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/DiscreteThreshold.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/FillingOption.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/LibraryShape.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/Path.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/PropertyThreshold.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/Rectangle.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/Shape.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/ShapeGroup.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/SimpleShape.js +1 -1
- package/src/sap/suite/ui/commons/statusindicator/StatusIndicator.js +1 -1
- package/src/sap/suite/ui/commons/taccount/TAccount.js +1 -1
- package/src/sap/suite/ui/commons/taccount/TAccountGroup.js +1 -1
- package/src/sap/suite/ui/commons/taccount/TAccountItem.js +1 -1
- package/src/sap/suite/ui/commons/taccount/TAccountItemProperty.js +1 -1
- package/src/sap/suite/ui/commons/taccount/TAccountPanel.js +1 -1
- package/src/sap/suite/ui/commons/themes/base/NetworkGraph.less +23 -6
- package/src/sap/suite/ui/commons/themes/base/Timeline.less +2 -2
- package/src/sap/suite/ui/commons/themes/sap_belize_base/NetworkGraph.less +23 -6
- package/src/sap/suite/ui/commons/themes/sap_belize_base/Timeline.less +2 -2
- package/src/sap/suite/ui/commons/themes/sap_belize_hcb/NetworkGraph.less +23 -2
- package/src/sap/suite/ui/commons/themes/sap_belize_hcw/NetworkGraph.less +23 -2
- package/src/sap/suite/ui/commons/themes/sap_hcb/base_NetworkGraph.less +23 -6
|
@@ -198,7 +198,7 @@ sap.ui.define([
|
|
|
198
198
|
"sap.suite.ui.commons.TargetFilterMeasureColumn",
|
|
199
199
|
"sap.suite.ui.commons.AriaProperties"
|
|
200
200
|
],
|
|
201
|
-
version: "1.
|
|
201
|
+
version: "1.152.0",
|
|
202
202
|
extensions: {
|
|
203
203
|
flChangeHandlers: {
|
|
204
204
|
"sap.suite.ui.commons.Timeline": "sap/suite/ui/commons/flexibility/Timeline"
|
|
@@ -462,7 +462,7 @@ IMGEDITOR_FILTER_SEPIA=Sepia
|
|
|
462
462
|
IMGEDITOR_FILTER_GRAYSCALE=\u0421\u043A\u0430\u043B\u0430 \u0441\u043E \u0441\u0438\u0432\u0438 \u0442\u043E\u043D\u043E\u0432\u0438
|
|
463
463
|
IMGEDITOR_FILTER_SATURATION=\u0417\u0430\u0441\u0438\u0442\u0435\u043D\u043E\u0441\u0442
|
|
464
464
|
IMGEDITOR_FILTER_HUE=\u041D\u0438\u0458\u0430\u043D\u0441\u0430
|
|
465
|
-
IMGEDITOR_FILTER_INVERT=\
|
|
465
|
+
IMGEDITOR_FILTER_INVERT=\u0418\u043D\u0432\u0435\u0440\u0437\u0438\u0458\u0430
|
|
466
466
|
IMGEDITOR_FILTER_BRIGHTNESS=\u0421\u0432\u0435\u0442\u043B\u0438\u043D\u0430
|
|
467
467
|
IMGEDITOR_FILTER_CONTRAST=\u041A\u043E\u043D\u0442\u0440\u0430\u0441\u0442
|
|
468
468
|
IMGEDITOR_FILTER_BLUR=\u0417\u0430\u043C\u0430\u0442\u0435\u043D\u043E
|
|
@@ -500,7 +500,7 @@ sap.ui.define([
|
|
|
500
500
|
|
|
501
501
|
ElementBase.prototype._appendActionButton = function (mArguments, $wrapper) {
|
|
502
502
|
var sId = mArguments.id ? "id=\"" + mArguments.id + "\"" : "";
|
|
503
|
-
var sButtonHtml = "<div " + sId + " title=\"" + mArguments.title + "\"class=\"sapSuiteUiCommonsNetworkGraphDivActionButtonBackground\">";
|
|
503
|
+
var sButtonHtml = "<div " + sId + " title=\"" + mArguments.title + "\" role=\"button\" aria-label=\"" + mArguments.title + "\" class=\"sapSuiteUiCommonsNetworkGraphDivActionButtonBackground\">";
|
|
504
504
|
sButtonHtml += "<div class=\"sapSuiteUiCommonsNetworkGraphDivActionButton ";
|
|
505
505
|
|
|
506
506
|
if (!mArguments.enable) {
|
|
@@ -509,7 +509,7 @@ sap.ui.define([
|
|
|
509
509
|
}
|
|
510
510
|
sButtonHtml += "\">";
|
|
511
511
|
|
|
512
|
-
sButtonHtml += this._renderHtmlIcon(mArguments.icon, (mArguments.class || ""));
|
|
512
|
+
sButtonHtml += this._renderHtmlIcon(mArguments.icon, (mArguments.class || ""), null, null, mArguments.title);
|
|
513
513
|
|
|
514
514
|
sButtonHtml += "</div>";
|
|
515
515
|
sButtonHtml += "<div class=\"sapSuiteUiCommonsNetworkActionButtonFocusCircle\"></div>";
|
|
@@ -536,6 +536,11 @@ sap.ui.define([
|
|
|
536
536
|
(Math.min(iY1, iY2) < iBottom);
|
|
537
537
|
};
|
|
538
538
|
|
|
539
|
+
ElementBase._isRectFullyOnScreen = function (iX1, iX2, iY1, iY2, iLeft, iRight, iTop, iBottom) {
|
|
540
|
+
return (Math.min(iX1, iX2) >= iLeft) && (Math.max(iX1, iX2) <= iRight) &&
|
|
541
|
+
(Math.min(iY1, iY2) >= iTop) && (Math.max(iY1, iY2) <= iBottom);
|
|
542
|
+
};
|
|
543
|
+
|
|
539
544
|
ElementBase.prototype._isOnScreen = function (iLeft, iRight, iTop, iBottom) {
|
|
540
545
|
return false;
|
|
541
546
|
};
|
|
@@ -314,7 +314,7 @@ sap.ui.define([
|
|
|
314
314
|
* @since 1.151
|
|
315
315
|
*/
|
|
316
316
|
enableEnhancedLineRouting: {
|
|
317
|
-
type: "boolean", group: "Behavior", defaultValue:
|
|
317
|
+
type: "boolean", group: "Behavior", defaultValue: true
|
|
318
318
|
}
|
|
319
319
|
},
|
|
320
320
|
aggregations: {
|
|
@@ -1306,6 +1306,7 @@ sap.ui.define([
|
|
|
1306
1306
|
this._updateAccessibility(oFocus);
|
|
1307
1307
|
}
|
|
1308
1308
|
this._updateAccessibility(oFocus);
|
|
1309
|
+
this._ensureOnScreen(oFocus ? oFocus.item : null);
|
|
1309
1310
|
return;
|
|
1310
1311
|
}
|
|
1311
1312
|
|
|
@@ -1381,6 +1382,8 @@ sap.ui.define([
|
|
|
1381
1382
|
} else {
|
|
1382
1383
|
fnSetDefaultAccessibilityTitle();
|
|
1383
1384
|
}
|
|
1385
|
+
} else if (oFocus.item instanceof Line) {
|
|
1386
|
+
this._setAccessibilityTitle(oFocus.item._getActionButtonTitle(oFocus.button));
|
|
1384
1387
|
} else {
|
|
1385
1388
|
fnSetDefaultAccessibilityTitle();
|
|
1386
1389
|
}
|
|
@@ -3014,7 +3017,7 @@ sap.ui.define([
|
|
|
3014
3017
|
* @private
|
|
3015
3018
|
*/
|
|
3016
3019
|
Graph.prototype._ensureOnScreen = function (oItem) {
|
|
3017
|
-
if (!oItem || !this.$scroller) {
|
|
3020
|
+
if (!oItem || !this.$scroller || typeof oItem._isOnScreen !== "function") {
|
|
3018
3021
|
return;
|
|
3019
3022
|
}
|
|
3020
3023
|
|
|
@@ -3046,7 +3049,9 @@ sap.ui.define([
|
|
|
3046
3049
|
iCenterY = oItem.getY();
|
|
3047
3050
|
}
|
|
3048
3051
|
|
|
3049
|
-
|
|
3052
|
+
const iItemRight = oItem instanceof Node ? oItem.getX() + oItem._iWidth : iCenterX;
|
|
3053
|
+
const iItemBottom = oItem instanceof Node ? oItem.getY() + oItem._iHeight : iCenterY;
|
|
3054
|
+
if (iCenterX < iLeft || iCenterX > iRight || iItemRight > iRight) {
|
|
3050
3055
|
let iTargetScrollLeft = iCenterX * this._fZoomLevel - this.$scroller.width() / 2;
|
|
3051
3056
|
|
|
3052
3057
|
if (this._bIsRtl) {
|
|
@@ -3056,7 +3061,7 @@ sap.ui.define([
|
|
|
3056
3061
|
|
|
3057
3062
|
oScroller.scrollLeft = iTargetScrollLeft;
|
|
3058
3063
|
}
|
|
3059
|
-
if (iCenterY < iTop || iCenterY > iBottom) {
|
|
3064
|
+
if (iCenterY < iTop || iCenterY > iBottom || iItemBottom > iBottom) {
|
|
3060
3065
|
oScroller.scrollTop = iCenterY * this._fZoomLevel - this.$scroller.height() / 2;
|
|
3061
3066
|
}
|
|
3062
3067
|
}
|
|
@@ -773,7 +773,7 @@ sap.ui.define([
|
|
|
773
773
|
Group.prototype._isOnScreen = function (iLeft, iRight, iTop, iBottom) {
|
|
774
774
|
var iX = this.getX(),
|
|
775
775
|
iY = this.getY();
|
|
776
|
-
return ElementBase.
|
|
776
|
+
return ElementBase._isRectFullyOnScreen(iX, iX + this._iWidth, iY, iY + this._iHeight, iLeft, iRight, iTop, iBottom);
|
|
777
777
|
};
|
|
778
778
|
|
|
779
779
|
/* =========================================================== */
|
|
@@ -936,6 +936,17 @@ sap.ui.define([
|
|
|
936
936
|
return aSentenceParts.join('. ');
|
|
937
937
|
};
|
|
938
938
|
|
|
939
|
+
/**
|
|
940
|
+
* Returns the accessible title for a Line action button.
|
|
941
|
+
* @param {object} oItem - DOM element of the focused action button
|
|
942
|
+
* @returns {string}
|
|
943
|
+
* @private
|
|
944
|
+
*/
|
|
945
|
+
Line.prototype._getActionButtonTitle = function (oItem) {
|
|
946
|
+
var sTitle = jQuery(oItem).attr("title");
|
|
947
|
+
return (sTitle ? sTitle + " " : "") + oResourceBundle.getText("NETWORK_GRAPH_ACCESSIBILITY_ACTION_BUTTON");
|
|
948
|
+
};
|
|
949
|
+
|
|
939
950
|
/* =========================================================== */
|
|
940
951
|
/* Public methods */
|
|
941
952
|
/* =========================================================== */
|
|
@@ -4066,7 +4066,7 @@ sap.ui.define([
|
|
|
4066
4066
|
Node.prototype._isOnScreen = function(iLeft, iRight, iTop, iBottom) {
|
|
4067
4067
|
var iX = this.getX(),
|
|
4068
4068
|
iY = this.getY();
|
|
4069
|
-
return ElementBase.
|
|
4069
|
+
return ElementBase._isRectFullyOnScreen(iX, iX + this._iWidth, iY, iY + this._iHeight, iLeft, iRight, iTop, iBottom);
|
|
4070
4070
|
};
|
|
4071
4071
|
|
|
4072
4072
|
Node.prototype.getFocusDomRef = function() {
|
|
@@ -102,7 +102,9 @@ sap.ui.define([
|
|
|
102
102
|
}.bind(this),
|
|
103
103
|
beforeOpen: function () {
|
|
104
104
|
this._fnCreate();
|
|
105
|
-
|
|
105
|
+
if (this.oCloseButton) {
|
|
106
|
+
this._oPopover.setInitialFocus(this.oCloseButton.getId());
|
|
107
|
+
}
|
|
106
108
|
if (this._oOpener && this._oElement && this._oElement._setActionButtonFocus) {
|
|
107
109
|
this._oElement._setActionButtonFocus(this._oOpener, false);
|
|
108
110
|
}
|
|
@@ -731,7 +731,7 @@ sap.ui.define([
|
|
|
731
731
|
const x3 = this.getRightGridIntersectionPoint(AX1, AY1, gridSize, minEdgeLength).x;
|
|
732
732
|
const iDiff = Math.abs(x1 - AX2);
|
|
733
733
|
const x4 = iDiff <= gridSize ? (x1 + x2) / 2 : this.getRightGridIntersectionPoint(AX2, AY2, gridSize, minEdgeLength).x;
|
|
734
|
-
const y3 =
|
|
734
|
+
const y3 = bEnhanced ? this._getRoutingYBelow(sourceNode, gridSize) : y1 < gridSize ? this.getBottomGridIntersectionPoint(x3, y1 + sourceNode._iHeight, gridSize, minEdgeLength).y : this.getTopGridIntersectionPoint(x3, y1, gridSize, minEdgeLength).y;
|
|
735
735
|
return [{ x: x3, y: AY1 }, { x: x3, y: y3 }, { x: x4, y: y3 }, { x: x4, y: AY2 }];
|
|
736
736
|
} else if (x1 <= x2) {
|
|
737
737
|
// SCENARIO 1B: Source to the left of target - create C-shaped path on right side
|
|
@@ -742,7 +742,7 @@ sap.ui.define([
|
|
|
742
742
|
const iDff = Math.abs(AX1 - x2);
|
|
743
743
|
const x3 = iDff <= gridSize ? (AX1 + x2) / 2 : this.getRightGridIntersectionPoint(AX1, AY1, gridSize, minEdgeLength).x;
|
|
744
744
|
const x4 = this.getRightGridIntersectionPoint(AX2, AY2, gridSize, minEdgeLength).x;
|
|
745
|
-
const y3 =
|
|
745
|
+
const y3 = bEnhanced ? this._getRoutingYBelow(sourceNode, gridSize) : y1 < gridSize ? this.getBottomGridIntersectionPoint(x3, y1 + sourceNode._iHeight, gridSize, minEdgeLength).y : this.getTopGridIntersectionPoint(x3, y1, gridSize, minEdgeLength).y;
|
|
746
746
|
return [{ x: x3, y: AY1 }, { x: x3, y: y3 }, { x: x4, y: y3 }, { x: x4, y: AY2 }];
|
|
747
747
|
}
|
|
748
748
|
} else if (y1 != y2) {
|
|
@@ -764,24 +764,12 @@ sap.ui.define([
|
|
|
764
764
|
} else {
|
|
765
765
|
x4 = this.getRightGridIntersectionPoint(AX2, AY2, gridSize, minEdgeLength).x;
|
|
766
766
|
}
|
|
767
|
-
const y3 = y1 <= gridSize ? (bEnhanced ? this._getRoutingYBelow(sourceNode, gridSize) : this.getBottomGridIntersectionPoint(x3, y1 + sourceNode._iHeight, gridSize, minEdgeLength).y) : this.getTopGridIntersectionPoint(x3, y1, gridSize, minEdgeLength).y;
|
|
768
|
-
if (AY2 > y1 + sourceNode._iHeight) {
|
|
769
|
-
// Simple vertical connection if target anchor is below source node
|
|
770
|
-
// Visual: [SRC]→
|
|
771
|
-
// |
|
|
772
|
-
// ↓
|
|
773
|
-
// [TGT]→
|
|
767
|
+
const y3 = y1 <= gridSize ? (bEnhanced ? this._getRoutingYBelow(sourceNode, gridSize) : this.getBottomGridIntersectionPoint(x3, y1 + sourceNode._iHeight, gridSize, minEdgeLength).y) : (bEnhanced ? this._getRoutingYBelow(sourceNode, gridSize) : this.getTopGridIntersectionPoint(x3, y1, gridSize, minEdgeLength).y);
|
|
768
|
+
if (!bEnhanced && AY2 > y1 + sourceNode._iHeight) {
|
|
774
769
|
const aCords = AX2 > AX1 ? [{x: x4, y: AY1}, {x: x4, y: AY2}] : [{ x: x3, y: AY1 }, { x: x3, y: AY2 }];
|
|
775
770
|
return aCords;
|
|
776
|
-
} else {
|
|
777
|
-
// Need to avoid target node - create stepped path
|
|
778
|
-
// Visual: [SRC]→
|
|
779
|
-
// |
|
|
780
|
-
// ↓---- →
|
|
781
|
-
// |
|
|
782
|
-
// [TGT]→
|
|
783
|
-
return [{ x: x3, y: AY1 }, { x: x3, y: y3 }, { x: x4, y: y3 }, { x: x4, y: AY2 }];
|
|
784
771
|
}
|
|
772
|
+
return [{ x: x3, y: AY1 }, { x: x3, y: y3 }, { x: x4, y: y3 }, { x: x4, y: AY2 }];
|
|
785
773
|
} else if (y1 > y2) {
|
|
786
774
|
// SCENARIO 2A2: Source below and right of target
|
|
787
775
|
// Visual: [TGT]→
|
|
@@ -797,24 +785,12 @@ sap.ui.define([
|
|
|
797
785
|
} else {
|
|
798
786
|
x4 = this.getRightGridIntersectionPoint(AX2, AY2, gridSize, minEdgeLength).x;
|
|
799
787
|
}
|
|
800
|
-
const y3 = y2 <= gridSize ? (bEnhanced ? this._getRoutingYBelow(sourceNode, gridSize) : this.getBottomGridIntersectionPoint(x3, y1 + sourceNode._iHeight, gridSize, minEdgeLength)) : this.getTopGridIntersectionPoint(x4, y2, gridSize, minEdgeLength).y;
|
|
801
|
-
if (AY1 > y2 + targetNode._iHeight) {
|
|
802
|
-
// Simple vertical connection if target anchor is below source node
|
|
803
|
-
// Visual: [SRC]→
|
|
804
|
-
// |
|
|
805
|
-
// ↓
|
|
806
|
-
// [TGT]→
|
|
788
|
+
const y3 = y2 <= gridSize ? (bEnhanced ? this._getRoutingYBelow(sourceNode, gridSize) : this.getBottomGridIntersectionPoint(x3, y1 + sourceNode._iHeight, gridSize, minEdgeLength)) : (bEnhanced ? this._getRoutingYBelow(sourceNode, gridSize) : this.getTopGridIntersectionPoint(x4, y2, gridSize, minEdgeLength).y);
|
|
789
|
+
if (!bEnhanced && AY1 > y2 + targetNode._iHeight) {
|
|
807
790
|
const aCords = AX2 > AX1 ? [{x: x4, y: AY1}, {x: x4, y: AY2}] : [{ x: x3, y: AY1 }, { x: x3, y: AY2 }];
|
|
808
791
|
return aCords;
|
|
809
|
-
} else {
|
|
810
|
-
// Need to avoid target node - create stepped path
|
|
811
|
-
// Visual: [SRC]→
|
|
812
|
-
// |
|
|
813
|
-
// ↓---- →
|
|
814
|
-
// |
|
|
815
|
-
// [TGT]→
|
|
816
|
-
return [{ x: x3, y: AY1 }, { x: x3, y: y3 }, { x: x4, y: y3 }, { x: x4, y: AY2 }];
|
|
817
792
|
}
|
|
793
|
+
return [{ x: x3, y: AY1 }, { x: x3, y: y3 }, { x: x4, y: y3 }, { x: x4, y: AY2 }];
|
|
818
794
|
}
|
|
819
795
|
} else if (x1 <= x2) {
|
|
820
796
|
// SCENARIO 2B: Source is to the left of target
|
|
@@ -833,26 +809,12 @@ sap.ui.define([
|
|
|
833
809
|
} else {
|
|
834
810
|
x4 = this.getRightGridIntersectionPoint(AX2, AY2, gridSize, minEdgeLength).x;
|
|
835
811
|
}
|
|
836
|
-
const y3 = y1 <= gridSize ? (bEnhanced ? this._getRoutingYBelow(sourceNode, gridSize) : this.getBottomGridIntersectionPoint(x3, y1 + sourceNode._iHeight, gridSize, minEdgeLength).y) : this.getTopGridIntersectionPoint(x3, y1, gridSize, minEdgeLength).y;
|
|
837
|
-
if (AY2 > y1 + sourceNode._iHeight) {
|
|
838
|
-
// Simple vertical connection if target anchor is below source node
|
|
839
|
-
// Visual: [SRC]→
|
|
840
|
-
// |
|
|
841
|
-
// ↓
|
|
842
|
-
// [TGT]→
|
|
812
|
+
const y3 = y1 <= gridSize ? (bEnhanced ? this._getRoutingYBelow(sourceNode, gridSize) : this.getBottomGridIntersectionPoint(x3, y1 + sourceNode._iHeight, gridSize, minEdgeLength).y) : (bEnhanced ? this._getRoutingYBelow(sourceNode, gridSize) : this.getTopGridIntersectionPoint(x3, y1, gridSize, minEdgeLength).y);
|
|
813
|
+
if (!bEnhanced && AY2 > y1 + sourceNode._iHeight) {
|
|
843
814
|
const aCords = AX2 > AX1 ? [{x: x4, y: AY1}, {x: x4, y: AY2}] : [{ x: x3, y: AY1 }, { x: x3, y: AY2 }];
|
|
844
815
|
return aCords;
|
|
845
|
-
} else {
|
|
846
|
-
// Need to avoid target node - create stepped path
|
|
847
|
-
// Visual: [SRC]→
|
|
848
|
-
// |
|
|
849
|
-
// ↓---- →
|
|
850
|
-
// |
|
|
851
|
-
// [TGT]→
|
|
852
|
-
return [{ x: x3, y: AY1 }, { x: x3, y: y3 }, { x: x4, y: y3 }, { x: x4, y: AY2 }];
|
|
853
816
|
}
|
|
854
|
-
|
|
855
|
-
// return aCoordinates;
|
|
817
|
+
return [{ x: x3, y: AY1 }, { x: x3, y: y3 }, { x: x4, y: y3 }, { x: x4, y: AY2 }];
|
|
856
818
|
} else if (y1 > y2) {
|
|
857
819
|
// SCENARIO 2B2: Source below and left of target
|
|
858
820
|
// Visual: [TGT]→
|
|
@@ -868,26 +830,12 @@ sap.ui.define([
|
|
|
868
830
|
} else {
|
|
869
831
|
x4 = this.getRightGridIntersectionPoint(AX2, AY2, gridSize, minEdgeLength).x;
|
|
870
832
|
}
|
|
871
|
-
const y3 = y2 <= gridSize ? (bEnhanced ? this._getRoutingYBelow(sourceNode, gridSize) : this.getBottomGridIntersectionPoint(x3, y1 + sourceNode._iHeight, gridSize, minEdgeLength)) : this.getTopGridIntersectionPoint(x4, y2, gridSize, minEdgeLength).y;
|
|
872
|
-
if (AY1 > y2 + targetNode._iHeight) {
|
|
873
|
-
// Simple vertical connection if target anchor is below source node
|
|
874
|
-
// Visual: [SRC]→
|
|
875
|
-
// |
|
|
876
|
-
// ↓
|
|
877
|
-
// [TGT]→
|
|
833
|
+
const y3 = y2 <= gridSize ? (bEnhanced ? this._getRoutingYBelow(sourceNode, gridSize) : this.getBottomGridIntersectionPoint(x3, y1 + sourceNode._iHeight, gridSize, minEdgeLength)) : (bEnhanced ? this._getRoutingYBelow(sourceNode, gridSize) : this.getTopGridIntersectionPoint(x4, y2, gridSize, minEdgeLength).y);
|
|
834
|
+
if (!bEnhanced && AY1 > y2 + targetNode._iHeight) {
|
|
878
835
|
const aCords = AX2 > AX1 ? [{x: x4, y: AY1}, {x: x4, y: AY2}] : [{ x: x3, y: AY1 }, { x: x3, y: AY2 }];
|
|
879
836
|
return aCords;
|
|
880
|
-
} else {
|
|
881
|
-
// Need to avoid target node - create stepped path
|
|
882
|
-
// Visual: [SRC]→
|
|
883
|
-
// |
|
|
884
|
-
// ↓---- →
|
|
885
|
-
// |
|
|
886
|
-
// [TGT]→
|
|
887
|
-
return [{ x: x3, y: AY1 }, { x: x3, y: y3 }, { x: x4, y: y3 }, { x: x4, y: AY2 }];
|
|
888
837
|
}
|
|
889
|
-
|
|
890
|
-
// return aCoordinates;
|
|
838
|
+
return [{ x: x3, y: AY1 }, { x: x3, y: y3 }, { x: x4, y: y3 }, { x: x4, y: AY2 }];
|
|
891
839
|
}
|
|
892
840
|
}
|
|
893
841
|
}
|