@targetprocess/relations-renderer 1.4.0 → 1.4.2
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.
|
@@ -17,10 +17,10 @@ var RenderingBackend = /** @class */ (function () {
|
|
|
17
17
|
};
|
|
18
18
|
RenderingBackend.prototype.getGrid = function () {
|
|
19
19
|
// NOTE: beware of grids inside entity views (such as sprint list in Release and so on)
|
|
20
|
-
return jquery_1.default('.tau-board .i-role-grid');
|
|
20
|
+
return jquery_1.default('.tau-board .i-role-grid', this.getLookupRoot());
|
|
21
21
|
};
|
|
22
22
|
RenderingBackend.prototype.getSvg = function () {
|
|
23
|
-
return jquery_1.default('svg.mashupCustomUnitShowRelations__svg');
|
|
23
|
+
return jquery_1.default('svg.mashupCustomUnitShowRelations__svg', this.getLookupRoot());
|
|
24
24
|
};
|
|
25
25
|
RenderingBackend.prototype.appendSvg = function ($svg) {
|
|
26
26
|
this.getGrid().append($svg);
|
|
@@ -42,6 +42,10 @@ var RenderingBackend = /** @class */ (function () {
|
|
|
42
42
|
RenderingBackend.prototype.getIntersectionPoints = function (cardPos, targetPos, _gridRect, _relation) {
|
|
43
43
|
return intersection_1.intersectRects(cardPos, targetPos);
|
|
44
44
|
};
|
|
45
|
+
// Dashboards render several views at once; a page-wide lookup would mix cards and arrows of different widgets
|
|
46
|
+
RenderingBackend.prototype.getLookupRoot = function () {
|
|
47
|
+
return (this.context.getViewRoot && this.context.getViewRoot()) || document;
|
|
48
|
+
};
|
|
45
49
|
return RenderingBackend;
|
|
46
50
|
}());
|
|
47
51
|
exports.default = RenderingBackend;
|